<!DOCTYPE html><html class="hide-aside" lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><title>Botui Talk Robot | Akilarの糖果屋</title><meta name="keywords" content="📁Hexo,🦋Butterfly"><meta name="author" content="Akilar"><meta name="copyright" content="Akilar"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="botui.js是一个简单的聊天机器人框架。"><meta property="og:type" content="article"><meta property="og:title" content="Botui Talk Robot"><meta property="og:url" content="https://akilar.top/posts/9dc1acf8/"><meta property="og:site_name" content="Akilarの糖果屋"><meta property="og:description" content="botui.js是一个简单的聊天机器人框架。"><meta property="og:locale" content="zh_CN"><meta property="og:image" content="https://img.zcool.cn/community/0183d061dd8ce511013e8cd04451eb.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100"><meta property="article:published_time" content="2020-10-22T11:04:08.000Z"><meta property="article:modified_time" content="2021-01-31T20:59:28.000Z"><meta property="article:author" content="Akilar"><meta property="article:tag" content="📁Hexo"><meta property="article:tag" content="🦋Butterfly"><meta name="twitter:card" content="summary"><meta name="twitter:image" content="https://img.zcool.cn/community/0183d061dd8ce511013e8cd04451eb.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100"><link rel="shortcut icon" href="https://npm.elemecdn.com/akiblog@1.0.1/img/siteicon/favicon.png"><link rel="canonical" href="https://akilar.top/posts/9dc1acf8/" media="defer" onload='this.media="all"'><link rel="preconnect" href="//cdn.jsdelivr.net"><link rel="preconnect" href="//at.alicdn.com/"><link rel="preconnect" href="//cdnjs.cloudflare.com/"><link rel="preconnect" href="//sdk.51.la"><meta name="google_site_verification" content="INnh6jnldNB3hxjSoa9ut7Kd9xX9R6Mqe7807EJsbCc"><meta name="baidu-site-verification" content="code-6O1kXu3a70"><meta name="msvalidate.01" content="3A07763DBFF970229752E8DF7999C30D"><link rel="manifest" href="/manifest.json"><link rel="apple-touch-icon" sizes="180x180" href="https://npm.elemecdn.com/akiblog@1.0.1/img/image/siteicon/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="https://npm.elemecdn.com/akiblog@1.0.1/img/siteicon/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="https://npm.elemecdn.com/akiblog@1.0.1/img/siteicon/favicon-16x16.png"><link rel="mask-icon" href="https://npm.elemecdn.com/akiblog@1.0.1/img/siteicon/safari-pinned-tab.svg" color="#5bbad5"><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://npm.elemecdn.com/@fortawesome/fontawesome-free@6.1.2/css/all.min.css" media="print" onload='this.media="all"'><link rel="stylesheet" href="https://npm.elemecdn.com/node-snackbar@0.1.16/dist/snackbar.min.css" media="print" onload='this.media="all"'><div class="js-pjax"><script charset="UTF-8" id="LA_COLLECT" src="https://sdk.51.la/js-sdk-pro.min.js"></script><script>LA.init({id:"JdyxkljyWpUOuTqt",ck:"JdyxkljyWpUOuTqt"})</script></div><script src="https://sdk.51.la/perf/js-sdk-perf.min.js" crossorigin="anonymous"></script><script>(new LingQue.Monitor).init({id:"JdzAJUCrdUGoOC7D"})</script><link rel="stylesheet" href="https://npm.elemecdn.com/akiblog@1.0.1/css/animate.min.css" media="print" onload='this.media="screen"'><link rel="stylesheet" href="https://npm.elemecdn.com/swiper@8.4.2/swiper-bundle.min.css" media="print" onload='this.media="all"'><script>const GLOBAL_CONFIG={root:"/",algolia:{appId:"STO7Z288QA",apiKey:"dbcfd77c89c49f19b42d68e572943881",indexName:"akilar",hits:{per_page:3},languages:{input_placeholder:"搜索文章",hits_empty:"找不到您查询的内容：${query}",hits_stats:"找到 ${hits} 条结果，用时 ${time} 毫秒"}},localSearch:void 0,translate:{defaultEncoding:2,translateDelay:0,msgToTraditionalChinese:"<i>繁</i><sapn>簡繁轉換</span>",msgToSimplifiedChinese:"<i>简</i><sapn>简繁转换</span>"},noticeOutdate:{limitDay:30,position:"top",messagePrev:"It has been",messageNext:"days since the last update, the content of the article may be outdated."},highlight:{plugin:"highlighjs",highlightCopy:!0,highlightLang:!0,highlightHeightLimit:130},copy:{success:"吾辈宣布你的剪贴板已经被我占领啦！",error:"抱歉，复制好像出了点问题。",noSupport:"你的浏览器好像不支持"},relativeDate:{homepage:!1,post:!1},runtime:"天",date_suffix:{just:"刚刚",min:"分钟前",hour:"小时前",day:"天前",month:"个月前"},copyright:void 0,lightbox:"mediumZoom",Snackbar:{chs_to_cht:"你已切换为繁体",cht_to_chs:"你已切换为简体",day_to_night:"你已切换为深色模式",night_to_day:"你已切换为浅色模式",bgLight:"#49B1F5",bgDark:"#1f1f1f",position:"top-center"},source:{justifiedGallery:{js:"https://npm.elemecdn.com/flickr-justified-gallery@2.1.2/dist/fjGallery.min.js",css:"https://npm.elemecdn.com/flickr-justified-gallery@2.1.2/dist/fjGallery.css"}},isPhotoFigcaption:!0,islazyload:!0,isAnchor:!1}</script><script id="config-diff">var GLOBAL_CONFIG_SITE={title:"Botui Talk Robot",isPost:!0,isHome:!1,isHighlightShrink:!1,isToc:!0,postUpdate:"2021-01-31 20:59:28"}</script><noscript><style>#nav{opacity:1}.justified-gallery img{opacity:1}#post-meta time,#recent-posts time{display:inline!important}</style></noscript><script>(e=>{e.saveToLocal={set:function(e,t,o){if(0===o)return;const a=864e5*o,n={value:t,expiry:(new Date).getTime()+a};localStorage.setItem(e,JSON.stringify(n))},get:function(e){const t=localStorage.getItem(e);if(!t)return;const o=JSON.parse(t);if(!((new Date).getTime()>o.expiry))return o.value;localStorage.removeItem(e)}},e.getScript=e=>new Promise((t,o)=>{const a=document.createElement("script");a.src=e,a.async=!0,a.onerror=o,a.onload=a.onreadystatechange=function(){const e=this.readyState;e&&"loaded"!==e&&"complete"!==e||(a.onload=a.onreadystatechange=null,t())},document.head.appendChild(a)}),e.activateDarkMode=function(){document.documentElement.setAttribute("data-theme","dark"),null!==document.querySelector('meta[name="theme-color"]')&&document.querySelector('meta[name="theme-color"]').setAttribute("content","#0d0d0d")},e.activateLightMode=function(){document.documentElement.setAttribute("data-theme","light"),null!==document.querySelector('meta[name="theme-color"]')&&document.querySelector('meta[name="theme-color"]').setAttribute("content","#ffffff")};const t=saveToLocal.get("theme"),o=(new Date).getHours();void 0===t?o<=6||o>=18?activateDarkMode():activateLightMode():"light"===t?activateLightMode():activateDarkMode();const a=saveToLocal.get("aside-status");void 0!==a&&("hide"===a?document.documentElement.classList.add("hide-aside"):document.documentElement.classList.remove("hide-aside"));/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)&&document.documentElement.classList.add("apple")})(window)</script><link rel="stylesheet" href="https://npm.elemecdn.com/akiblog@1.0.1/css/custom.css" media="defer" onload='this.media="all"'><link rel="stylesheet" href="https://widget.heweather.net/simple/static/css/he-simple.css?v=1.4.0" media="defer" onload='this.media="all"'><script src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/SAO-Notify.js" async></script><script async src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/carousel-touch.js"></script><svg aria-hidden="true" style="position:absolute;overflow:hidden;width:0;height:0"><symbol id="icon-sun" viewBox="0 0 1024 1024"><path d="M960 512l-128 128v192h-192l-128 128-128-128H192v-192l-128-128 128-128V192h192l128-128 128 128h192v192z" fill="#FFD878" p-id="8420"></path><path d="M736 512a224 224 0 1 0-448 0 224 224 0 1 0 448 0z" fill="#FFE4A9" p-id="8421"></path><path d="M512 109.248 626.752 224H800v173.248L914.752 512 800 626.752V800h-173.248L512 914.752 397.248 800H224v-173.248L109.248 512 224 397.248V224h173.248L512 109.248M512 64l-128 128H192v192l-128 128 128 128v192h192l128 128 128-128h192v-192l128-128-128-128V192h-192l-128-128z" fill="#4D5152" p-id="8422"></path><path d="M512 320c105.888 0 192 86.112 192 192s-86.112 192-192 192-192-86.112-192-192 86.112-192 192-192m0-32a224 224 0 1 0 0 448 224 224 0 0 0 0-448z" fill="#4D5152" p-id="8423"></path></symbol><symbol id="icon-moon" viewBox="0 0 1024 1024"><path d="M611.370667 167.082667a445.013333 445.013333 0 0 1-38.4 161.834666 477.824 477.824 0 0 1-244.736 244.394667 445.141333 445.141333 0 0 1-161.109334 38.058667 85.077333 85.077333 0 0 0-65.066666 135.722666A462.08 462.08 0 1 0 747.093333 102.058667a85.077333 85.077333 0 0 0-135.722666 65.024z" fill="#FFB531" p-id="11345"></path><path d="M329.728 274.133333l35.157333-35.157333a21.333333 21.333333 0 1 0-30.165333-30.165333l-35.157333 35.157333-35.114667-35.157333a21.333333 21.333333 0 0 0-30.165333 30.165333l35.114666 35.157333-35.114666 35.157334a21.333333 21.333333 0 1 0 30.165333 30.165333l35.114667-35.157333 35.157333 35.157333a21.333333 21.333333 0 1 0 30.165333-30.165333z" fill="#030835" p-id="11346"></path></symbol></svg><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-filter-gitcalendar/lib/gitcalendar.css" media="print" onload='this.media="all"'><meta name="generator" content="Hexo 6.2.0"><link rel="alternate" href="/atom.xml" title="Akilarの糖果屋" type="application/atom+xml"></head><body><div id="loading-box"><div class="ark-loading" id="ark-loading"><div class="ark-loading-top-container"><div class="ark-loading-top-left-flash"></div><div class="ark-loading-top-left-border"></div><div class="ark-loading-top-triangle"></div><div class="ark-loading-top-right-border"></div><div class="ark-loading-top-right-flash"></div></div><div class="ark-loading-bottom-container"><div class="ark-loading-bottom-left-border"></div><div class="ark-loading-bottom-left-triangle"></div><div class="ark-loading-bottom-center-border"></div><div class="ark-loading-bottom-right-triangle"></div><div class="ark-loading-bottom-right-border"></div></div><div class="ark-loading-main-container"><div class="ark-loading-content"><div class="ark-loading-power-left"></div><div class="ark-loading-center-left-border"></div><div class="ark-loading-cab-outside-border"><div class="ark-loading-cab-insideborder"><div class="ark-loading-cab-container"><div class="ark-loading-percentage"></div><div class="ark-loading-tip"></div></div></div></div><div class="ark-loading-center-right-border"></div><div class="ark-loading-power-right"></div></div></div></div></div><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="" data-lazy-src="https://npm.elemecdn.com/akiblog@1.0.1/img/author.webp" onerror='onerror=null,src="https://npm.elemecdn.com/akiblog@1.0.1/img/404.gif"' alt="avatar"></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">480</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">63</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">6</div></a></div><hr><div class="menus_items"><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-laptop"></use></svg> <span>博客</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/archives/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-Calendar"></use></svg> <span>时间轴</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/tags/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-strategy"></use></svg> <span>标签</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/fcircle/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-forumdiscusstion"></use></svg> <span>朋友圈</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/link/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-connection"></use></svg> <span>友人帐</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/comments/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-letter"></use></svg> <span>留言板</span></a></div><div class="menus_item"><a class="site-page group faa-parent animated-hover" href="javascript:void(0);" rel="external nofollow noreferrer"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-hourglass"></use></svg> <span>生活</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="faa-parent animated-hover site-page child" href="/gallery/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-strategy"></use></svg> <span>相册</span></a></li><li><a class="faa-parent animated-hover site-page child" href="/bangumis/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-unicorn"></use></svg> <span>追番</span></a></li><li><a class="faa-parent animated-hover site-page child" href="/about/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-Achievement"></use></svg> <span>关于</span></a></li></ul></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="javascript:toRandomPost()" rel="external nofollow noreferrer"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-teamwork"></use></svg> <span>随便看看</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image:url(https://img.zcool.cn/community/0183d061dd8ce511013e8cd04451eb.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100)"><div class="menu-container" id="menu-container"><div class="menu-item"><div class="menu-item-main"><a class="site-page faa-parent animated-hover" href="/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-laptop"></use></svg> <span>博客</span></a></div><div class="menu-item-main"><a class="site-page faa-parent animated-hover" href="/archives/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-Calendar"></use></svg> <span>时间轴</span></a></div><div class="menu-item-main"><a class="site-page faa-parent animated-hover" href="/tags/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-strategy"></use></svg> <span>标签</span></a></div><div class="menu-item-main"><a class="site-page faa-parent animated-hover" href="/fcircle/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-forumdiscusstion"></use></svg> <span>朋友圈</span></a></div><div class="menu-item-main"><a class="site-page faa-parent animated-hover" href="/link/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-connection"></use></svg> <span>友人帐</span></a></div><div class="menu-item-main"><a class="site-page faa-parent animated-hover" href="/comments/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-letter"></use></svg> <span>留言板</span></a></div><div class="menu-item-main has-child"><div class="menu-item-parent"><a class="site-page faa-parent animated-hover" href="javascript:void(0);" rel="external nofollow noreferrer"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-hourglass"></use></svg> <span>生活</span></a></div><div class="menu-item-child"><a class="faa-parent animated-hover site-page child" href="/gallery/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-strategy"></use></svg> <span>相册</span></a></div><div class="menu-item-child"><a class="faa-parent animated-hover site-page child" href="/bangumis/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-unicorn"></use></svg> <span>追番</span></a></div><div class="menu-item-child"><a class="faa-parent animated-hover site-page child" href="/about/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-Achievement"></use></svg> <span>关于</span></a></div></div><div class="menu-item-main"><a class="site-page faa-parent animated-hover" href="javascript:toRandomPost()" rel="external nofollow noreferrer"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-teamwork"></use></svg> <span>随便看看</span></a></div></div><div class="top-bar"><div class="message-container"><div class="message-item message-weather" onclick="btf.scrollToDest(0,500)"><div class="message-weather-box" id="he-plugin-simple"></div></div><div class="message-item message-date" onclick="Navvisible()"><div class="message-date-box" id="message-date-box"></div><div class="message-title-box" id="message-title-box"><a id="site-name" title="botui.js是一个简单的聊天机器人框架。">基于Butterfly主题的侧边栏botui聊天机器人</a></div></div><div class="message-item message-function"><div id="search-button"><a class="site-page social-icon search faa-parent animated-hover"><svg class="faa-tada icon" style="height:25px;width:25px" aria-hidden="true"><use xlink:href="#icon-analitic"></use></svg> <span>搜索</span></a></div><a class="icon-V hidden faa-parent animated-hover" onclick="switchNightMode()" title="昼夜切换"><svg class="faa-tada" width="25" height="25" viewBox="0 0 1024 1024"><use id="modeicon" xlink:href="#icon-moon"></use></svg></a><div id="toggle-menu"><a class="site-page faa-parent animated-hover"><svg class="faa-tada icon" style="height:25px;width:25px" aria-hidden="true"><use xlink:href="#icon-MobileApps"></use></svg></a></div></div></div></div><button class="active-button" onclick="Navvisible()"></button></div><div id="post-info"><h1 class="post-title">Botui Talk Robot<a class="post-edit-link" href="https://github.com/Akilarlxh/Hexo-blog-source/edit/master/source/_posts/Akilarの糖葫芦/美化日记/Botui-Talk-Robot.md" rel="external nofollow noreferrer" title="编辑" target="_blank"><i class="fas fa-feather-alt faa-tada animated-hover"></i></a></h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2020-10-22T11:04:08.000Z" title="发表于 2020-10-22 11:04:08">2020-10-22</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2021-01-31T20:59:28.000Z" title="更新于 2021-01-31 20:59:28">2021-01-31</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/%F0%9F%8D%A1Akilar%E3%81%AE%E7%B3%96%E8%91%AB%E8%8A%A6/">🍡Akilarの糖葫芦</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">6.9k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>38分钟</span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><details class="folding-tag" red><summary>开发记录</summary><div class="content"><div class="timeline undefined"><div class="timeline-item headline"><div class="timeline-item-title"><div class="item-circle"><p>开发记录</p></div></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2020-10-22:第一版搭建</p></div></div><div class="timeline-item-content"><div class="checkbox blue checked"><input type="checkbox" checked><p>实现了侧栏插入</p></div><div class="checkbox blue checked"><input type="checkbox" checked><p>修复了原生botui.js每次跳动到顶部的bug</p></div><div class="checkbox plus green checked"><input type="checkbox" checked><p>添加了pjax重载。避免换页消失</p></div><p>&lt;/div&gt;&lt;/div&gt;</p><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2020-10-25:添加按钮</p></div>&lt;/div&gt;<div class="timeline-item-content"><div class="checkbox blue checked"><input type="checkbox" checked><p>修复了每次进入页面优先跳到页面正中的不良体验。</p></div><p></p><div class="checkbox plus green checked"><input type="checkbox" checked><p>新增翻转按钮，移除pjax重载。</p></div><div class="checkbox minus yellow checked"><input type="checkbox" checked><p>移除data-pjax，将自动加载改为手动加载。将对话主动权交给用户。</p></div></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2020-11-16:版本优化</p></div></div><div class="timeline-item-content"><div class="checkbox plus green checked"><input type="checkbox" checked><p>增加butterfly_v3.3.0配置方案。</p></div></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2020-12-13:版本优化</p></div></div><div class="timeline-item-content"><div class="checkbox plus green checked"><input type="checkbox" checked><p>增加butterfly_v3.4.0配置方案。</p></div></div></div><div class="timeline-item"><div class="timeline-item-title"><div class="item-circle"><p>2021-1-31:适配3.6.0</p></div></div><div class="timeline-item-content"><ol><li>更新v3.6.0适配方案</li></ol></div></div></div></div></div></div></div></details><h2 id="botui-js简介"><a href="#botui-js简介" class="headerlink" title="botui.js简介"></a>botui.js简介</h2><a class="ghcard" rel="external nofollow noopener noreferrer noopener" target="_blank" href="https://github.com/botui/botui"><img class="no-lightbox" src="" data-lazy-src="https://github-readme-stats.vercel.app/api/pin/?username=botui&repo=botui&theme=calm&show_owner=true"></a><p>botui.js是一个简单的聊天机器人框架，使用它可以完成简易的脚本对话式交流。缺点是只能在自己设定的逻辑内进行有限问答，而不是像真正的AI那样智能会话。<br><img src="" data-lazy-src="https://npm.elemecdn.com/akilar-candyassets/image/vHQIx9jnb4PgzZu.png" alt=""></p><h2 id="静态资源下载"><a href="#静态资源下载" class="headerlink" title="静态资源下载"></a>静态资源下载</h2><div class="tip cogs faa-horizontal animated"><p>**由于本教程涉及的所有修改对缩进格式等有严格要求，担心自己控制不好的可以直接下载静态资源，将压缩包内的butterfly文件夹复制到<code>[Blogroot]\theme\</code>目录下覆盖现有主题文件夹即可跳过以下教程的前4步，直接到主题配置文件<code>_config.butterfly.yml</code>中参照第5、6两步修改配置项。如果不希望全局引入侧栏，请读者自行根据自己的主题版本，参看第2步进行修改。</p></div><div class="btns rounded center"><a class="button" target="_blank" rel="noopener external nofollow noreferrer" href="https://wwe.lanzoui.com/i0iJgjc849c" title="下载botui.zip"><i class="fas fa-download"></i> 下载botui.zip</a></div><h2 id="修改步骤"><a href="#修改步骤" class="headerlink" title="修改步骤"></a>修改步骤</h2><ol><li><p>在<code>~\[blogroot]\themes\butterfly\layout\includes\widget\</code>目录下新建<code>card_botui.pug</code>，注意对齐格式。可以自定义修改按钮显示的内容。</p><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">.card-widget.card-botui</span><br><span class="line">  .card-content(style=&#x27;height:320px;&#x27;)</span><br><span class="line">    .item-headline</span><br><span class="line">      i.fas.fa-comments</span><br><span class="line">      span= _p(&#x27;aside.card_botui&#x27;)</span><br><span class="line">    #hello-akilar.botui-app-container(style=&#x27;width:100%;padding:0.5px&#x27;)</span><br><span class="line">      bot-ui</span><br><span class="line">        .facemain</span><br><span class="line">          figure</span><br><span class="line">            div</span><br><span class="line">              span.face 要来和我聊聊么？</span><br><span class="line">              span.face</span><br><span class="line">                a(href=&#x27;javascript:void(0);&#x27; onclick=&#x27;botui_init()&#x27;) 欢迎光临糖果屋</span><br></pre></td></tr></table></figure></li><li><p>修改<code>~\[blogroot]\themes\butterfly\layout\includes\widget\index.pug</code>，注意对齐格式。</p><div class="tip key faa-horizontal animated faa-slow"><p>对xwcker疑问的解答：</p><ul><li><p>关于<strong>include ./card_botui.pug</strong>和<strong>!=partial(‘includes/widget/card_botui’, {}, {cache:theme.fragment_cache})</strong>两种写法的区别，其实本质上都是可以引入<strong>card_botui</strong>的，最终呈现的效果并无区别。不过后者使用了hexo自带的缓存，能够更快的生成页面。</p></li><li><p>用于区分是否是<strong>butterfly_v3.3.0</strong>的关键，在于<strong>index.pug</strong>中是否存在<strong>if is_post()</strong>这个判断方法。</p></li></ul></div><div class="tabs" id="index"><ul class="nav-tabs"><li class="tab active"><button type="button" data-href="#index-1">butterfly_3.1.0-3.2.0添加写法</button></li><li class="tab"><button type="button" data-href="#index-2">butterfly_3.3.0添加写法</button></li><li class="tab"><button type="button" data-href="#index-3">butterfly_3.4.0-3.5.1添加写法</button></li><li class="tab"><button type="button" data-href="#index-4">butterfly_3.6.0添加写法</button></li></ul><div class="tab-contents"><div class="tab-item-content active" id="index-1"><figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">    #aside_content.aside_content</span><br><span class="line">      if theme.aside.card_author.enable</span><br><span class="line">        include ./card_author.pug</span><br><span class="line">      .sticky_layout</span><br><span class="line"><span class="addition">+       if theme.aside.card_botui.enable</span></span><br><span class="line"><span class="addition">+         include ./card_botui.pug</span></span><br><span class="line">        if theme.aside.card_announcement.enable</span><br><span class="line">          include ./card_announcement.pug</span><br><span class="line">        if theme.aside.card_recent_post.enable</span><br><span class="line">          include ./card_recent_post.pug</span><br><span class="line">        if theme.newest_comments.enable</span><br><span class="line">          include ./card_newest_comment.pug</span><br><span class="line">        if theme.ad &amp;&amp; theme.ad.aside</span><br></pre></td></tr></table></figure><button type="button" class="tab-to-top" aria-label="scroll to top"><i class="fas fa-arrow-up"></i></button></div><div class="tab-item-content" id="index-2"><div class="note info flat"><p>此处写法是在站点页和文章页都添加了<code>card_botui</code>，只需要文章页有的就只写上面这个。只需要站点页有的就只写下面这个。</p></div><figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br></pre></td><td class="code"><pre><span class="line">    #aside_content.aside_content</span><br><span class="line">      if theme.aside.card_author.enable</span><br><span class="line">        !=partial(&#x27;includes/widget/card_author&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">      if theme.aside.card_announcement.enable</span><br><span class="line">        !=partial(&#x27;includes/widget/card_announcement&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">      .sticky_layout</span><br><span class="line">        if is_post()</span><br><span class="line">          if showToc</span><br><span class="line">            include ./card_post_toc.pug</span><br><span class="line"><span class="addition">+         if theme.aside.card_botui.enable</span></span><br><span class="line"><span class="addition">+           !=partial(&#x27;includes/widget/card_botui&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span></span><br><span class="line">          if theme.aside.card_recent_post.enable</span><br><span class="line">            !=partial(&#x27;includes/widget/card_recent_post&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">          if theme.ad &amp;&amp; theme.ad.aside</span><br><span class="line">            !=partial(&#x27;includes/widget/card_ad&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">        else</span><br><span class="line"><span class="addition">+         if theme.aside.card_botui.enable</span></span><br><span class="line"><span class="addition">+           !=partial(&#x27;includes/widget/card_botui&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span></span><br><span class="line">          if theme.aside.card_recent_post.enable</span><br><span class="line">            !=partial(&#x27;includes/widget/card_recent_post&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">          if theme.ad &amp;&amp; theme.ad.aside</span><br><span class="line">            !=partial(&#x27;includes/widget/card_ad&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">          if theme.newest_comments.enable</span><br><span class="line">            !=partial(&#x27;includes/widget/card_newest_comment&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">          if theme.aside.card_categories.enable</span><br><span class="line">            !=partial(&#x27;includes/widget/card_categories&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">          if theme.aside.card_tags.enable</span><br><span class="line">            !=partial(&#x27;includes/widget/card_tags&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">          if theme.aside.card_archives.enable</span><br><span class="line">            !=partial(&#x27;includes/widget/card_archives&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">          if theme.aside.card_webinfo.enable</span><br><span class="line">            !=partial(&#x27;includes/widget/card_webinfo&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line"></span><br></pre></td></tr></table></figure><button type="button" class="tab-to-top" aria-label="scroll to top"><i class="fas fa-arrow-up"></i></button></div><div class="tab-item-content" id="index-3"><div class="note info flat"><p>此处写法是在站点页和文章页都添加了card_botui，只需要文章页有的就只写上面这个。只需要站点页有的就只写下面这个。</p></div><figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br></pre></td><td class="code"><pre><span class="line">    #aside_content.aside_content</span><br><span class="line">    //- post</span><br><span class="line">    if is_post()</span><br><span class="line">      if showToc &amp;&amp; theme.toc.style_simple</span><br><span class="line">        .sticky_layout</span><br><span class="line">          include ./card_post_toc.pug</span><br><span class="line">      else</span><br><span class="line">        !=partial(&#x27;includes/widget/card_author&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">        !=partial(&#x27;includes/widget/card_announcement&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">        .sticky_layout</span><br><span class="line">          if showToc</span><br><span class="line">            include ./card_post_toc.pug</span><br><span class="line"><span class="addition">+         if theme.aside.card_botui.enable</span></span><br><span class="line"><span class="addition">+           !=partial(&#x27;includes/widget/card_botui&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span></span><br><span class="line">          !=partial(&#x27;includes/widget/card_recent_post&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">          !=partial(&#x27;includes/widget/card_ad&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">    else</span><br><span class="line">      //- page</span><br><span class="line">      !=partial(&#x27;includes/widget/card_author&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">      !=partial(&#x27;includes/widget/card_announcement&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">      .sticky_layout</span><br><span class="line"><span class="addition">+       if theme.aside.card_botui.enable</span></span><br><span class="line"><span class="addition">+         !=partial(&#x27;includes/widget/card_botui&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span></span><br><span class="line">        !=partial(&#x27;includes/widget/card_recent_post&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">        !=partial(&#x27;includes/widget/card_ad&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">        !=partial(&#x27;includes/widget/card_newest_comment&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">        !=partial(&#x27;includes/widget/card_categories&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">        !=partial(&#x27;includes/widget/card_tags&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">        !=partial(&#x27;includes/widget/card_archives&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)</span><br><span class="line">        !=partial(&#x27;includes/widget/card_webinfo&#x27;, &#123;&#125;, &#123;cache:theme.fragment_cache&#125;)  </span><br></pre></td></tr></table></figure><button type="button" class="tab-to-top" aria-label="scroll to top"><i class="fas fa-arrow-up"></i></button></div><div class="tab-item-content" id="index-4"><div class="note info flat"><p>此处写法是在站点页和文章页都添加了card_botui，只需要文章页有的就只写上面这个。只需要站点页有的就只写下面这个。</p></div><figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br></pre></td><td class="code"><pre><span class="line">    #aside_content.aside_content</span><br><span class="line">    //- post</span><br><span class="line">    if is_post()</span><br><span class="line">      if showToc &amp;&amp; theme.toc.style_simple</span><br><span class="line">        .sticky_layout</span><br><span class="line">          include ./card_post_toc.pug</span><br><span class="line">      else</span><br><span class="line">        !=partial(&#x27;includes/widget/card_author&#x27;, &#123;&#125;, &#123;cache: true&#125;)</span><br><span class="line">        !=partial(&#x27;includes/widget/card_announcement&#x27;, &#123;&#125;, &#123;cache: true&#125;)</span><br><span class="line">        .sticky_layout</span><br><span class="line">          if showToc</span><br><span class="line">            include ./card_post_toc.pug</span><br><span class="line"><span class="addition">+         if theme.aside.card_botui.enable</span></span><br><span class="line"><span class="addition">+           !=partial(&#x27;includes/widget/card_botui&#x27;, &#123;&#125;, &#123;cache: true&#125;)</span></span><br><span class="line">          !=partial(&#x27;includes/widget/card_recent_post&#x27;, &#123;&#125;, &#123;cache: true&#125;)</span><br><span class="line">          !=partial(&#x27;includes/widget/card_ad&#x27;, &#123;&#125;, &#123;cache: true&#125;)</span><br><span class="line">    else</span><br><span class="line">      //- page</span><br><span class="line">      !=partial(&#x27;includes/widget/card_author&#x27;, &#123;&#125;, &#123;cache: true&#125;)</span><br><span class="line">      !=partial(&#x27;includes/widget/card_announcement&#x27;, &#123;&#125;, &#123;cache: true&#125;)</span><br><span class="line">      .sticky_layout</span><br><span class="line"><span class="addition">+       if theme.aside.card_botui.enable</span></span><br><span class="line"><span class="addition">+         !=partial(&#x27;includes/widget/card_botui&#x27;, &#123;&#125;, &#123;cache: true&#125;)</span></span><br><span class="line">        !=partial(&#x27;includes/widget/card_recent_post&#x27;, &#123;&#125;, &#123;cache: true&#125;)</span><br><span class="line">        !=partial(&#x27;includes/widget/card_ad&#x27;, &#123;&#125;, &#123;cache: true&#125;)</span><br><span class="line">        !=partial(&#x27;includes/widget/card_newest_comment&#x27;, &#123;&#125;, &#123;cache: true&#125;)</span><br><span class="line">        !=partial(&#x27;includes/widget/card_categories&#x27;, &#123;&#125;, &#123;cache: true&#125;)</span><br><span class="line">        !=partial(&#x27;includes/widget/card_tags&#x27;, &#123;&#125;, &#123;cache: true&#125;)</span><br><span class="line">        !=partial(&#x27;includes/widget/card_archives&#x27;, &#123;&#125;, &#123;cache: true&#125;)</span><br><span class="line">        !=partial(&#x27;includes/widget/card_webinfo&#x27;, &#123;&#125;, &#123;cache: true&#125;)  </span><br></pre></td></tr></table></figure><button type="button" class="tab-to-top" aria-label="scroll to top"><i class="fas fa-arrow-up"></i></button></div></div></div></li><li><p>在<code>~\[blogroot]\themes\butterfly\source\css\</code>目录下新建<code>card_botui.css</code>,</p><figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br><span class="line">321</span><br><span class="line">322</span><br><span class="line">323</span><br><span class="line">324</span><br><span class="line">325</span><br><span class="line">326</span><br><span class="line">327</span><br><span class="line">328</span><br><span class="line">329</span><br><span class="line">330</span><br><span class="line">331</span><br><span class="line">332</span><br><span class="line">333</span><br><span class="line">334</span><br><span class="line">335</span><br><span class="line">336</span><br><span class="line">337</span><br><span class="line">338</span><br><span class="line">339</span><br><span class="line">340</span><br><span class="line">341</span><br><span class="line">342</span><br><span class="line">343</span><br><span class="line">344</span><br><span class="line">345</span><br><span class="line">346</span><br><span class="line">347</span><br><span class="line">348</span><br><span class="line">349</span><br><span class="line">350</span><br><span class="line">351</span><br><span class="line">352</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">@import</span> url(<span class="attribute">https</span>://fonts.googleapis.com/css?family=Open+Sans);</span><br><span class="line"><span class="selector-class">.botui-container</span>&#123;</span><br><span class="line">  <span class="attribute">font-size</span>:<span class="number">14px</span>;</span><br><span class="line">  <span class="attribute">background-color</span>:<span class="number">#fff</span>;</span><br><span class="line">  <span class="attribute">font-family</span>:<span class="string">&quot;Open Sans&quot;</span>,sans-serif</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.botui-messages-container</span>&#123;</span><br><span class="line">  <span class="attribute">padding</span>:<span class="number">10px</span> <span class="number">20px</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.botui-actions-container</span>&#123;</span><br><span class="line">  <span class="attribute">padding</span>:<span class="number">10px</span> <span class="number">20px</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.botui-message</span>&#123;</span><br><span class="line">  <span class="attribute">min-height</span>:<span class="number">30px</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.botui-message-content</span>&#123;</span><br><span class="line">  <span class="attribute">padding</span>:<span class="number">7px</span> <span class="number">13px</span>;</span><br><span class="line">  <span class="attribute">border-radius</span>:<span class="number">15px</span>;</span><br><span class="line">  <span class="attribute">color</span>:<span class="number">#595a5a</span>;</span><br><span class="line">  <span class="attribute">background-color</span>:<span class="number">#ebebeb</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.botui-message-content</span><span class="selector-class">.human</span>&#123;</span><br><span class="line">  <span class="attribute">color</span>:<span class="number">#f7f8f8</span>;</span><br><span class="line">  <span class="attribute">background-color</span>:<span class="number">#919292</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.botui-message-content</span><span class="selector-class">.text</span>&#123;</span><br><span class="line">  <span class="attribute">line-height</span>:<span class="number">1.3</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.botui-message-content</span><span class="selector-class">.loading</span>&#123;</span><br><span class="line">  <span class="attribute">background-color</span>:<span class="built_in">rgba</span>(<span class="number">206</span>,<span class="number">206</span>,<span class="number">206</span>,.<span class="number">5</span>);</span><br><span class="line">  <span class="attribute">line-height</span>:<span class="number">1.3</span>;</span><br><span class="line">  <span class="attribute">text-align</span>:center</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.botui-message-content</span><span class="selector-class">.embed</span>&#123;</span><br><span class="line">  <span class="attribute">padding</span>:<span class="number">5px</span>;</span><br><span class="line">  <span class="attribute">border-radius</span>:<span class="number">5px</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.botui-message-content-link</span>&#123;</span><br><span class="line">  <span class="attribute">color</span>:<span class="number">#919292</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.botui-actions-text-input</span>&#123;</span><br><span class="line">  <span class="attribute">border</span>:<span class="number">0</span>;</span><br><span class="line">  <span class="attribute">outline</span>:<span class="number">0</span>;</span><br><span class="line">  <span class="attribute">border-radius</span>:<span class="number">0</span>;</span><br><span class="line">  <span class="attribute">padding</span>:<span class="number">5px</span> <span class="number">7px</span>;</span><br><span class="line">  <span class="attribute">font-family</span>:<span class="string">&quot;Open Sans&quot;</span>,sans-serif;</span><br><span class="line">  <span class="attribute">background-color</span>:transparent;</span><br><span class="line">  <span class="attribute">color</span>:<span class="number">#595a5a</span>;</span><br><span class="line">  <span class="attribute">border-bottom</span>:<span class="number">1px</span> solid <span class="number">#919292</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.botui-actions-text-submit</span>&#123;</span><br><span class="line">  <span class="attribute">color</span>:<span class="number">#fff</span>;</span><br><span class="line">  <span class="attribute">width</span>:<span class="number">30px</span>;</span><br><span class="line">  <span class="attribute">padding</span>:<span class="number">5px</span>;</span><br><span class="line">  <span class="attribute">height</span>:<span class="number">30px</span>;</span><br><span class="line">  <span class="attribute">line-height</span>:<span class="number">1</span>;</span><br><span class="line">  <span class="attribute">border-radius</span>:<span class="number">50%</span>;</span><br><span class="line">  <span class="attribute">border</span>:<span class="number">1px</span> solid <span class="number">#919292</span>;</span><br><span class="line">  <span class="attribute">background</span>:<span class="number">#777979</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.botui-actions-buttons-button</span>&#123;</span><br><span class="line">  <span class="attribute">border</span>:<span class="number">0</span>;</span><br><span class="line">  <span class="attribute">color</span>:<span class="number">#fff</span>;</span><br><span class="line">  <span class="attribute">line-height</span>:<span class="number">1</span>;</span><br><span class="line">  <span class="attribute">cursor</span>:pointer;</span><br><span class="line">  <span class="attribute">font-size</span>:<span class="number">14px</span>;</span><br><span class="line">  <span class="attribute">font-weight</span>:<span class="number">500</span>;</span><br><span class="line">  <span class="attribute">padding</span>:<span class="number">7px</span> <span class="number">15px</span>;</span><br><span class="line">  <span class="attribute">border-radius</span>:<span class="number">4px</span>;</span><br><span class="line">  <span class="attribute">font-family</span>:<span class="string">&quot;Open Sans&quot;</span>,sans-serif;</span><br><span class="line">  <span class="attribute">background</span>:<span class="number">#777979</span>;</span><br><span class="line">  <span class="attribute">box-shadow</span>:<span class="number">2px</span> <span class="number">3px</span> <span class="number">4px</span> <span class="number">0</span> <span class="built_in">rgba</span>(<span class="number">0</span>,<span class="number">0</span>,<span class="number">0</span>,.<span class="number">25</span>)</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.botui-actions-text-select</span>&#123;</span><br><span class="line">  <span class="attribute">border</span>:<span class="number">0</span>;</span><br><span class="line">  <span class="attribute">outline</span>:<span class="number">0</span>;</span><br><span class="line">  <span class="attribute">border-radius</span>:<span class="number">0</span>;</span><br><span class="line">  <span class="attribute">padding</span>:<span class="number">5px</span> <span class="number">7px</span>;</span><br><span class="line">  <span class="attribute">font-family</span>:<span class="string">&quot;Open Sans&quot;</span>,sans-serif;</span><br><span class="line">  <span class="attribute">background-color</span>:transparent;</span><br><span class="line">  <span class="attribute">color</span>:<span class="number">#595a5a</span>;</span><br><span class="line">  <span class="attribute">border-bottom</span>:<span class="number">1px</span> solid <span class="number">#919292</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.botui-actions-text-searchselect</span>&#123;</span><br><span class="line">  <span class="attribute">border</span>:<span class="number">0</span>;</span><br><span class="line">  <span class="attribute">outline</span>:<span class="number">0</span>;</span><br><span class="line">  <span class="attribute">border-radius</span>:<span class="number">0</span>;</span><br><span class="line">  <span class="attribute">padding</span>:<span class="number">5px</span> <span class="number">7px</span>;</span><br><span class="line">  <span class="attribute">font-family</span>:<span class="string">&quot;Open Sans&quot;</span>,sans-serif;</span><br><span class="line">  <span class="attribute">background-color</span>:transparent;</span><br><span class="line">  <span class="attribute">color</span>:<span class="number">#595a5a</span>;</span><br><span class="line">  <span class="attribute">border-bottom</span>:<span class="number">1px</span> solid <span class="number">#919292</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.botui-actions-text-searchselect</span> <span class="selector-class">.dropdown-toggle</span>&#123;</span><br><span class="line">  <span class="attribute">border</span>:none<span class="meta">!important</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.botui-actions-text-searchselect</span> <span class="selector-class">.selected-tag</span>&#123;</span><br><span class="line">  <span class="attribute">background-color</span>:transparent<span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">border</span>:<span class="number">0</span><span class="meta">!important</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.slide-fade-enter-active</span>&#123;</span><br><span class="line">  <span class="attribute">transition</span>:all .<span class="number">3s</span> ease</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.slide-fade-enter</span>,<span class="selector-class">.slide-fade-leave-to</span>&#123;</span><br><span class="line">  <span class="attribute">opacity</span>:<span class="number">0</span>;</span><br><span class="line">  <span class="attribute">transform</span>:<span class="built_in">translateX</span>(-<span class="number">10px</span>)</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.dot</span>&#123;</span><br><span class="line">  <span class="attribute">width</span>:.<span class="number">5rem</span>;</span><br><span class="line">  <span class="attribute">height</span>:.<span class="number">5rem</span>;</span><br><span class="line">  <span class="attribute">border-radius</span>:.<span class="number">5rem</span>;</span><br><span class="line">  <span class="attribute">display</span>:inline-block;</span><br><span class="line">  <span class="attribute">background-color</span>:<span class="number">#919292</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.dot</span><span class="selector-pseudo">:nth-last-child</span>(<span class="number">1</span>)&#123;</span><br><span class="line">  <span class="attribute">margin-left</span>:.<span class="number">3rem</span>;</span><br><span class="line">  <span class="attribute">animation</span>:loading .<span class="number">6s</span> .<span class="number">3s</span> linear infinite</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.dot</span><span class="selector-pseudo">:nth-last-child</span>(<span class="number">2</span>)&#123;</span><br><span class="line">  <span class="attribute">margin-left</span>:.<span class="number">3rem</span>;</span><br><span class="line">  <span class="attribute">animation</span>:loading .<span class="number">6s</span> .<span class="number">2s</span> linear infinite</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.dot</span><span class="selector-pseudo">:nth-last-child</span>(<span class="number">3</span>)&#123;</span><br><span class="line">  <span class="attribute">animation</span>:loading .<span class="number">6s</span> .<span class="number">1s</span> linear infinite</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">@keyframes</span> loading&#123;</span><br><span class="line">  <span class="number">0%</span>&#123;<span class="attribute">transform</span>:<span class="built_in">translate</span>(<span class="number">0</span>,<span class="number">0</span>);</span><br><span class="line">    <span class="attribute">background-color</span>:<span class="number">#ababab</span></span><br><span class="line">    &#125;</span><br><span class="line">  <span class="number">25%</span>&#123;<span class="attribute">transform</span>:<span class="built_in">translate</span>(<span class="number">0</span>,-<span class="number">3px</span>)</span><br><span class="line">    &#125;</span><br><span class="line">  <span class="number">50%</span>&#123;<span class="attribute">transform</span>:<span class="built_in">translate</span>(<span class="number">0</span>,<span class="number">0</span>);</span><br><span class="line">    <span class="attribute">background-color</span>:<span class="number">#ababab</span></span><br><span class="line">    &#125;</span><br><span class="line">  <span class="number">75%</span>&#123;<span class="attribute">transform</span>:<span class="built_in">translate</span>(<span class="number">0</span>,<span class="number">3px</span>)</span><br><span class="line">    &#125;</span><br><span class="line">  <span class="number">100%</span>&#123;<span class="attribute">transform</span>:<span class="built_in">translate</span>(<span class="number">0</span>,<span class="number">0</span>)&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * botui 0.3.9</span></span><br><span class="line"><span class="comment"> * A JS library to build the UI for your bot</span></span><br><span class="line"><span class="comment"> * https://botui.org</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * Copyright 2019, Moin Uddin</span></span><br><span class="line"><span class="comment"> * Released under the MIT license.</span></span><br><span class="line"><span class="comment">*/</span></span><br><span class="line"><span class="selector-tag">a</span><span class="selector-class">.botui-message-content-link</span><span class="selector-pseudo">:focus</span> &#123;</span><br><span class="line">  <span class="attribute">outline</span>: thin dotted</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-tag">a</span><span class="selector-class">.botui-message-content-link</span><span class="selector-pseudo">:focus</span><span class="selector-pseudo">:active</span>, <span class="selector-tag">a</span><span class="selector-class">.botui-message-content-link</span><span class="selector-pseudo">:focus</span><span class="selector-pseudo">:hover</span> &#123;</span><br><span class="line">  <span class="attribute">outline</span>: <span class="number">0</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-tag">form</span><span class="selector-class">.botui-actions-text</span> &#123;</span><br><span class="line">  <span class="attribute">margin</span>: <span class="number">0</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-tag">button</span><span class="selector-class">.botui-actions-buttons-button</span>, <span class="selector-tag">input</span><span class="selector-class">.botui-actions-text-input</span> &#123;</span><br><span class="line">  <span class="attribute">margin</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">font-size</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">line-height</span>: normal;</span><br><span class="line">  <span class="attribute">vertical-align</span>: baseline</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-tag">button</span><span class="selector-class">.botui-actions-buttons-button</span>::-moz-focus-inner, input.botui-actions-text-input::-moz-focus-inner &#123;</span><br><span class="line">  <span class="attribute">border</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">padding</span>: <span class="number">0</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-tag">button</span><span class="selector-class">.botui-actions-buttons-button</span> &#123;</span><br><span class="line">  <span class="attribute">cursor</span>: pointer;</span><br><span class="line">  -webkit-appearance: button</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.botui-app-container</span> &#123;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">line-height</span>: <span class="number">1</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.botui-container</span> &#123;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">overflow-y</span>: auto;</span><br><span class="line">  <span class="attribute">overflow-x</span>: hidden</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.botui-message</span> &#123;</span><br><span class="line">  <span class="attribute">margin-top</span>: <span class="number">10px</span>;</span><br><span class="line">  <span class="attribute">margin-bottom</span>:<span class="number">10px</span></span><br><span class="line">  min-height: <span class="number">20px</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.botui-message</span><span class="selector-pseudo">:after</span> &#123;</span><br><span class="line">  <span class="attribute">display</span>: block;</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&quot;&quot;</span>;</span><br><span class="line">  <span class="attribute">clear</span>: both</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.botui-message-content</span> &#123;</span><br><span class="line">  <span class="attribute">width</span>: auto;</span><br><span class="line">  <span class="attribute">max-width</span>: <span class="number">85%</span>;</span><br><span class="line">  <span class="attribute">display</span>: inline-block</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.botui-message-content</span><span class="selector-class">.human</span> &#123;</span><br><span class="line">  <span class="attribute">float</span>: right</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.botui-message-content</span> <span class="selector-tag">iframe</span> &#123;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.botui-message-content-image</span> &#123;</span><br><span class="line">  <span class="attribute">margin</span>: <span class="number">2px</span> <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">display</span>: block;</span><br><span class="line">  <span class="attribute">max-width</span>: <span class="number">200px</span>;</span><br><span class="line">  <span class="attribute">max-height</span>: <span class="number">200px</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.botui-message-content-link</span> &#123;</span><br><span class="line">  <span class="attribute">text-decoration</span>: underline</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.profil</span> &#123;</span><br><span class="line">  <span class="attribute">position</span>: relative;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="number">50%</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.profil</span><span class="selector-class">.human</span> &#123;</span><br><span class="line">  <span class="attribute">float</span>: right;</span><br><span class="line">  <span class="attribute">margin-left</span>: <span class="number">0</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.profil</span><span class="selector-class">.agent</span> &#123;</span><br><span class="line">  <span class="attribute">float</span>: left;</span><br><span class="line">  <span class="attribute">margin-right</span>: <span class="number">0</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.profil</span>&gt;<span class="selector-tag">img</span> &#123;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">26px</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">26px</span>;</span><br><span class="line">  <span class="attribute">border</span>: <span class="number">1px</span> solid <span class="number">#e8e8e8</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.profil</span>&gt;<span class="selector-tag">img</span><span class="selector-class">.agent</span> &#123;</span><br><span class="line">  <span class="attribute">content</span>: <span class="built_in">url</span>(<span class="string">http://decodemoji.com/img/logos/blue_moji_hat.svg</span>);</span><br><span class="line">  <span class="attribute">border-radius</span>:<span class="number">50%</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-tag">button</span><span class="selector-class">.botui-actions-buttons-button</span>&#123;</span><br><span class="line">  <span class="attribute">margin-top</span>:<span class="number">10px</span>;</span><br><span class="line">  <span class="attribute">margin-bottom</span>:<span class="number">10px</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-tag">button</span><span class="selector-class">.botui-actions-buttons-button</span><span class="selector-pseudo">:not</span>(<span class="selector-pseudo">:last-child</span>)&#123;</span><br><span class="line">  <span class="attribute">margin-right</span>:<span class="number">10px</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">@media</span> (<span class="attribute">min-width</span>:<span class="number">400px</span>)&#123;</span><br><span class="line">  <span class="selector-class">.botui-actions-text-submit</span>&#123;</span><br><span class="line">    <span class="attribute">display</span>:none</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.botui</span><span class="selector-class">.botui-container</span>::-webkit-scrollbar &#123;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">0</span> <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="comment">/* 按钮动效 */</span></span><br><span class="line"><span class="selector-class">.facemain</span> &#123; <span class="attribute">font-size</span>: <span class="number">100%</span>; 	<span class="attribute">padding</span>: <span class="number">0</span>; <span class="attribute">margin</span>: <span class="number">0</span>;&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">/* Reset */</span></span><br><span class="line"><span class="selector-class">.facemain</span> *,</span><br><span class="line"><span class="selector-class">.facemain</span> *<span class="selector-pseudo">:after</span>,</span><br><span class="line"><span class="selector-class">.facemain</span> *<span class="selector-pseudo">:before</span> &#123;</span><br><span class="line">	-webkit-<span class="attribute">box-sizing</span>: border-box;</span><br><span class="line">	-moz-<span class="attribute">box-sizing</span>: border-box;</span><br><span class="line">	<span class="attribute">box-sizing</span>: border-box;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">/* Clearfix hack by Nicolas Gallagher: http://nicolasgallagher.com/micro-clearfix-hack/ */</span></span><br><span class="line"><span class="selector-class">.clearfix</span><span class="selector-pseudo">:before</span>,</span><br><span class="line"><span class="selector-class">.clearfix</span><span class="selector-pseudo">:after</span> &#123;</span><br><span class="line">	<span class="attribute">content</span>: <span class="string">&quot; &quot;</span>;</span><br><span class="line">	<span class="attribute">display</span>: table;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.clearfix</span><span class="selector-pseudo">:after</span> &#123;</span><br><span class="line">	<span class="attribute">clear</span>: both;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.facemain</span>&#123;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">250px</span>;</span><br><span class="line">  <span class="attribute">width</span>:<span class="number">300px</span>;</span><br><span class="line">  <span class="attribute">margin</span>: <span class="number">0</span> auto;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="number">10px</span>;</span><br><span class="line">  <span class="attribute">vertical-align</span>:middle;</span><br><span class="line">  <span class="attribute">display</span>:table-cell;</span><br><span class="line">	<span class="attribute">background</span>: <span class="number">#494A5F</span>;</span><br><span class="line">	<span class="attribute">color</span>: <span class="number">#D5D6E2</span>;</span><br><span class="line">	<span class="attribute">font-weight</span>: <span class="number">500</span>;</span><br><span class="line">	<span class="attribute">font-size</span>: <span class="number">1.05em</span>;</span><br><span class="line">	<span class="attribute">font-family</span>: <span class="string">&quot;Microsoft YaHei&quot;</span>,<span class="string">&quot;Segoe UI&quot;</span>, <span class="string">&quot;Lucida Grande&quot;</span>, Helvetica, Arial,sans-serif;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.facemain</span> <span class="selector-tag">a</span>&#123; <span class="attribute">color</span>: <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0.6</span>);<span class="attribute">outline</span>: none;<span class="attribute">text-decoration</span>: none;-webkit-<span class="attribute">transition</span>: <span class="number">0.2s</span>;<span class="attribute">transition</span>: <span class="number">0.2s</span>;&#125;</span><br><span class="line"><span class="selector-class">.facemain</span> <span class="selector-tag">a</span><span class="selector-pseudo">:hover</span>,<span class="selector-tag">a</span><span class="selector-pseudo">:focus</span>&#123;<span class="attribute">color</span>:<span class="number">#74777b</span>;<span class="attribute">text-decoration</span>: none;&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.facemain</span> <span class="selector-tag">figure</span> &#123;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">200px</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">60px</span>;</span><br><span class="line">  <span class="attribute">margin</span>: <span class="number">50px</span> auto;</span><br><span class="line">  <span class="attribute">cursor</span>: pointer;</span><br><span class="line">  <span class="attribute">perspective</span>: <span class="number">500px</span>;</span><br><span class="line">  -webkit-<span class="attribute">perspective</span>: <span class="number">500px</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.facemain</span> <span class="selector-tag">figure</span> <span class="selector-tag">div</span> &#123;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">transform-style</span>: preserve-<span class="number">3</span>d;</span><br><span class="line">  -webkit-<span class="attribute">transform-style</span>: preserve-<span class="number">3</span>d;</span><br><span class="line">  <span class="attribute">transition</span>: <span class="number">0.25s</span>;</span><br><span class="line">  -webkit-<span class="attribute">transition</span>: <span class="number">0.25s</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.facemain</span> <span class="selector-tag">figure</span><span class="selector-pseudo">:hover</span> <span class="selector-tag">div</span> &#123;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">rotateX</span>(-<span class="number">90deg</span>);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.facemain</span> <span class="selector-tag">span</span><span class="selector-class">.face</span> &#123;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">box-sizing</span>: border-box;</span><br><span class="line">  <span class="attribute">border</span>: <span class="number">5px</span> solid <span class="number">#fff</span>;</span><br><span class="line">  <span class="attribute">font-family</span>: <span class="string">&#x27;Source Sans Pro&#x27;</span>,sans-serif;</span><br><span class="line">  <span class="attribute">line-height</span>: <span class="number">50px</span>;</span><br><span class="line">  <span class="attribute">font-size</span>: <span class="number">17pt</span>;</span><br><span class="line">  <span class="attribute">text-align</span>: center;</span><br><span class="line">  <span class="attribute">text-transform</span>: uppercase;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.facemain</span> <span class="selector-tag">span</span><span class="selector-class">.face</span><span class="selector-pseudo">:nth-child</span>(<span class="number">1</span>) &#123;</span><br><span class="line">  <span class="attribute">color</span>: <span class="number">#fff</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translate3d</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">30px</span>);</span><br><span class="line">  -webkit-<span class="attribute">transform</span>: <span class="built_in">translate3d</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">30px</span>);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.facemain</span> <span class="selector-tag">span</span><span class="selector-class">.face</span><span class="selector-pseudo">:nth-child</span>(<span class="number">2</span>) &#123;</span><br><span class="line">  <span class="attribute">color</span>: <span class="number">#094b2c</span>;</span><br><span class="line">  <span class="attribute">background</span>: <span class="number">#fff</span>;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">rotateX</span>(<span class="number">90deg</span>) <span class="built_in">translate3d</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">30px</span>);</span><br><span class="line">  -webkit-<span class="attribute">transform</span>: <span class="built_in">rotateX</span>(<span class="number">90deg</span>) <span class="built_in">translate3d</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">30px</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></li><li><p>在<code>~\[blogroot]\themes\butterfly\source\js\</code>目录下新建<code>botui.js</code>和<code>botui_init.js</code>,</p><ul><li><p>botui.js</p><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br><span class="line">321</span><br><span class="line">322</span><br><span class="line">323</span><br><span class="line">324</span><br><span class="line">325</span><br><span class="line">326</span><br><span class="line">327</span><br><span class="line">328</span><br><span class="line">329</span><br><span class="line">330</span><br><span class="line">331</span><br><span class="line">332</span><br><span class="line">333</span><br><span class="line">334</span><br><span class="line">335</span><br><span class="line">336</span><br><span class="line">337</span><br><span class="line">338</span><br><span class="line">339</span><br><span class="line">340</span><br><span class="line">341</span><br><span class="line">342</span><br><span class="line">343</span><br><span class="line">344</span><br><span class="line">345</span><br><span class="line">346</span><br><span class="line">347</span><br><span class="line">348</span><br><span class="line">349</span><br><span class="line">350</span><br><span class="line">351</span><br><span class="line">352</span><br><span class="line">353</span><br><span class="line">354</span><br><span class="line">355</span><br><span class="line">356</span><br><span class="line">357</span><br><span class="line">358</span><br><span class="line">359</span><br><span class="line">360</span><br><span class="line">361</span><br><span class="line">362</span><br><span class="line">363</span><br><span class="line">364</span><br><span class="line">365</span><br><span class="line">366</span><br><span class="line">367</span><br><span class="line">368</span><br><span class="line">369</span><br><span class="line">370</span><br><span class="line">371</span><br><span class="line">372</span><br><span class="line">373</span><br><span class="line">374</span><br><span class="line">375</span><br><span class="line">376</span><br><span class="line">377</span><br><span class="line">378</span><br><span class="line">379</span><br><span class="line">380</span><br><span class="line">381</span><br><span class="line">382</span><br><span class="line">383</span><br><span class="line">384</span><br><span class="line">385</span><br><span class="line">386</span><br><span class="line">387</span><br><span class="line">388</span><br><span class="line">389</span><br><span class="line">390</span><br><span class="line">391</span><br><span class="line">392</span><br><span class="line">393</span><br><span class="line">394</span><br><span class="line">395</span><br><span class="line">396</span><br><span class="line">397</span><br><span class="line">398</span><br><span class="line">399</span><br><span class="line">400</span><br><span class="line">401</span><br><span class="line">402</span><br><span class="line">403</span><br><span class="line">404</span><br><span class="line">405</span><br><span class="line">406</span><br><span class="line">407</span><br><span class="line">408</span><br><span class="line">409</span><br><span class="line">410</span><br><span class="line">411</span><br><span class="line">412</span><br><span class="line">413</span><br><span class="line">414</span><br><span class="line">415</span><br><span class="line">416</span><br><span class="line">417</span><br><span class="line">418</span><br><span class="line">419</span><br><span class="line">420</span><br><span class="line">421</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * botui 0.3.9</span></span><br><span class="line"><span class="comment"> * A JS library to build the UI for your bot</span></span><br><span class="line"><span class="comment"> * https://botui.org</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * Copyright 2019, Moin Uddin</span></span><br><span class="line"><span class="comment"> * Released under the MIT license.</span></span><br><span class="line"><span class="comment">*/</span></span><br><span class="line"></span><br><span class="line">(<span class="keyword">function</span> (<span class="params">root, factory</span>) &#123;</span><br><span class="line">  <span class="string">&quot;use strict&quot;</span>;</span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> define === <span class="string">&#x27;function&#x27;</span> &amp;&amp; define.<span class="property">amd</span>) &#123;</span><br><span class="line">    <span class="title function_">define</span>([], <span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">      <span class="keyword">return</span> (root.<span class="property">BotUI</span> = <span class="title function_">factory</span>(root));</span><br><span class="line">    &#125;);</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    root.<span class="property">BotUI</span> = <span class="title function_">factory</span>(root);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;(<span class="keyword">typeof</span> <span class="variable language_">window</span> !== <span class="string">&#x27;undefined&#x27;</span> ? <span class="variable language_">window</span> : <span class="variable language_">this</span>, <span class="keyword">function</span> (<span class="params">root, <span class="literal">undefined</span></span>) &#123;</span><br><span class="line">  <span class="string">&quot;use strict&quot;</span>;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> <span class="title class_">BotUI</span> = (<span class="keyword">function</span> (<span class="params">id, opts</span>) &#123;</span><br><span class="line"></span><br><span class="line">    opts = opts || &#123;&#125;;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span>(!id) &#123;</span><br><span class="line">      <span class="keyword">throw</span> <span class="title class_">Error</span>(<span class="string">&#x27;BotUI: Container id is required as first argument.&#x27;</span>);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span>(!<span class="variable language_">document</span>.<span class="title function_">getElementById</span>(id)) &#123;</span><br><span class="line">      <span class="keyword">throw</span> <span class="title class_">Error</span>(<span class="string">&#x27;BotUI: Element with id #&#x27;</span> + id + <span class="string">&#x27; does not exist.&#x27;</span>);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span>(!root.<span class="property">Vue</span> &amp;&amp; !opts.<span class="property">vue</span>) &#123;</span><br><span class="line">      <span class="keyword">throw</span> <span class="title class_">Error</span>(<span class="string">&#x27;BotUI: Vue is required but not found.&#x27;</span>);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> _botApp, <span class="comment">// current vue instance.</span></span><br><span class="line">    _options = &#123;</span><br><span class="line">      <span class="attr">debug</span>: <span class="literal">false</span>,</span><br><span class="line">      <span class="attr">fontawesome</span>: <span class="literal">true</span>,</span><br><span class="line">      <span class="attr">searchselect</span>: <span class="literal">true</span></span><br><span class="line">    &#125;,</span><br><span class="line">    _container, <span class="comment">// the outermost Element. Needed to scroll to bottom, for now.</span></span><br><span class="line">    _interface = &#123;&#125;, <span class="comment">// methods returned by a BotUI() instance.</span></span><br><span class="line">    _actionResolve,</span><br><span class="line">    _markDownRegex = &#123;</span><br><span class="line">      <span class="attr">icon</span>: <span class="regexp">/!\(([^\)]+)\)/igm</span>, <span class="comment">// !(icon)</span></span><br><span class="line">      <span class="attr">image</span>: <span class="regexp">/!\[(.*?)\]\((.*?)\)/igm</span>, <span class="comment">// ![aleternate text](src)</span></span><br><span class="line">      <span class="attr">link</span>: <span class="regexp">/\[([^\[]+)\]\(([^\)]+)\)(\^?)/igm</span> <span class="comment">// [text](link) ^ can be added at end to set the target as &#x27;blank&#x27;</span></span><br><span class="line">    &#125;,</span><br><span class="line">    _fontAwesome = <span class="string">&#x27;https://use.fontawesome.com/ea731dcb6f.js&#x27;</span>,</span><br><span class="line">    _esPromisePollyfill = <span class="string">&#x27;https://cdn.jsdelivr.net/es6-promise/4.1.0/es6-promise.min.js&#x27;</span>, <span class="comment">// mostly for IE</span></span><br><span class="line">    _searchselect =  <span class="string">&quot;https://unpkg.com/vue-select@2.4.0/dist/vue-select.js&quot;</span>;</span><br><span class="line"></span><br><span class="line">    root.<span class="property">Vue</span> = root.<span class="property">Vue</span> || opts.<span class="property">vue</span>;</span><br><span class="line"></span><br><span class="line">    <span class="comment">// merge opts passed to constructor with _options</span></span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">var</span> prop <span class="keyword">in</span> _options) &#123;</span><br><span class="line">      <span class="keyword">if</span> (opts.<span class="title function_">hasOwnProperty</span>(prop)) &#123;</span><br><span class="line">        _options[prop] = opts[prop];</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span>(!root.<span class="property">Promise</span> &amp;&amp; <span class="keyword">typeof</span> <span class="title class_">Promise</span> === <span class="string">&quot;undefined&quot;</span> &amp;&amp; !opts.<span class="property">promise</span>) &#123;</span><br><span class="line">      <span class="title function_">loadScript</span>(_esPromisePollyfill);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">function</span> <span class="title function_">_linkReplacer</span>(<span class="params">match, $<span class="number">1</span>, $<span class="number">2</span>, $<span class="number">3</span></span>) &#123;</span><br><span class="line">      <span class="keyword">var</span> _target = $<span class="number">3</span> ? <span class="string">&#x27;blank&#x27;</span> : <span class="string">&#x27;&#x27;</span>; <span class="comment">// check if &#x27;^&#x27; sign is present with link syntax</span></span><br><span class="line">      <span class="keyword">return</span> <span class="string">&quot;&lt;a class=&#x27;botui-message-content-link&#x27; target=&#x27;&quot;</span> + _target + <span class="string">&quot;&#x27; href=&#x27;&quot;</span> + $<span class="number">2</span> +<span class="string">&quot;&#x27;&gt;&quot;</span> + $<span class="number">1</span> + <span class="string">&quot;&lt;/a&gt;&quot;</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">function</span> <span class="title function_">_parseMarkDown</span>(<span class="params">text</span>) &#123;</span><br><span class="line">      <span class="keyword">return</span> text</span><br><span class="line">                 .<span class="title function_">replace</span>(_markDownRegex.<span class="property">image</span>, <span class="string">&quot;&lt;img class=&#x27;botui-message-content-image&#x27; src=&#x27;$2&#x27; alt=&#x27;$1&#x27; /&gt;&quot;</span>)</span><br><span class="line">                 .<span class="title function_">replace</span>(_markDownRegex.<span class="property">icon</span>, <span class="string">&quot;&lt;i class=&#x27;botui-icon botui-message-content-icon fa fa-$1&#x27;&gt;&lt;/i&gt;&quot;</span>)</span><br><span class="line">                 .<span class="title function_">replace</span>(_markDownRegex.<span class="property">link</span>, _linkReplacer);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">function</span> <span class="title function_">loadScript</span>(<span class="params">src, cb</span>) &#123;</span><br><span class="line">      <span class="keyword">var</span> script = <span class="variable language_">document</span>.<span class="title function_">createElement</span>(<span class="string">&#x27;script&#x27;</span>);</span><br><span class="line">          script.<span class="property">type</span> = <span class="string">&#x27;text/javascript&#x27;</span>;</span><br><span class="line">          script.<span class="property">src</span> = src;</span><br><span class="line"></span><br><span class="line">          <span class="keyword">if</span>(cb) &#123;</span><br><span class="line">            script.<span class="property">onload</span> = cb;</span><br><span class="line">          &#125;</span><br><span class="line"></span><br><span class="line">      <span class="variable language_">document</span>.<span class="property">body</span>.<span class="title function_">appendChild</span>(script);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">function</span> <span class="title function_">_handleAction</span>(<span class="params">text</span>) &#123;</span><br><span class="line">      <span class="keyword">if</span>(_instance.<span class="property">action</span>.<span class="property">addMessage</span>) &#123;</span><br><span class="line">        _interface.<span class="property">message</span>.<span class="title function_">human</span>(&#123;</span><br><span class="line">          <span class="attr">delay</span>: <span class="number">100</span>,</span><br><span class="line">          <span class="attr">content</span>: text</span><br><span class="line">        &#125;);</span><br><span class="line">      &#125;</span><br><span class="line">      _instance.<span class="property">action</span>.<span class="property">show</span> = !_instance.<span class="property">action</span>.<span class="property">autoHide</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> _botuiComponent = &#123;</span><br><span class="line">      <span class="attr">template</span>: <span class="string">&#x27;&lt;div class=\&quot;botui botui-container\&quot; v-botui-container&gt;&lt;div class=\&quot;botui-messages-container\&quot;&gt;&lt;div v-for=\&quot;msg in messages\&quot; class=\&quot;botui-message\&quot; :class=\&quot;msg.cssClass\&quot; v-botui-scroll&gt;&lt;transition name=\&quot;slide-fade\&quot;&gt;&lt;div v-if=\&quot;msg.visible\&quot;&gt;&lt;div v-if=\&quot;msg.photo &amp;&amp; !msg.loading\&quot; :class=\&quot;[\&#x27;profil\&#x27;, \&#x27;profile\&#x27;, &#123;human: msg.human, \&#x27;agent\&#x27;: !msg.human&#125;]\&quot;&gt; &lt;img :src=\&quot;msg.photo\&quot; :class=\&quot;[&#123;human: msg.human, \&#x27;agent\&#x27;: !msg.human&#125;]\&quot;&gt;&lt;/div&gt;&lt;div :class=\&quot;[&#123;human: msg.human, \&#x27;botui-message-content\&#x27;: true&#125;, msg.type]\&quot;&gt;&lt;span v-if=\&quot;msg.type == \&#x27;text\&#x27;\&quot; v-text=\&quot;msg.content\&quot; v-botui-markdown&gt;&lt;/span&gt;&lt;span v-if=\&quot;msg.type == \&#x27;html\&#x27;\&quot; v-html=\&quot;msg.content\&quot;&gt;&lt;/span&gt; &lt;iframe v-if=\&quot;msg.type == \&#x27;embed\&#x27;\&quot; :src=\&quot;msg.content\&quot; frameborder=\&quot;0\&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/div&gt;&lt;/transition&gt;&lt;div v-if=\&quot;msg.photo &amp;&amp; msg.loading &amp;&amp; !msg.human\&quot; :class=\&quot;[\&#x27;profil\&#x27;, \&#x27;profile\&#x27;, &#123;human: msg.human, \&#x27;agent\&#x27;: !msg.human&#125;]\&quot;&gt; &lt;img :src=\&quot;msg.photo\&quot; :class=\&quot;[&#123;human: msg.human, \&#x27;agent\&#x27;: !msg.human&#125;]\&quot;&gt;&lt;/div&gt;&lt;div v-if=\&quot;msg.loading\&quot; class=\&quot;botui-message-content loading\&quot;&gt;&lt;i class=\&quot;dot\&quot;&gt;&lt;/i&gt;&lt;i class=\&quot;dot\&quot;&gt;&lt;/i&gt;&lt;i class=\&quot;dot\&quot;&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=\&quot;botui-actions-container\&quot;&gt;&lt;transition name=\&quot;slide-fade\&quot;&gt;&lt;div v-if=\&quot;action.show\&quot; v-botui-scroll&gt;&lt;form v-if=\&quot;action.type == \&#x27;text\&#x27;\&quot; class=\&quot;botui-actions-text\&quot; @submit.prevent=\&quot;handle_action_text()\&quot; :class=\&quot;action.cssClass\&quot;&gt;&lt;i v-if=\&quot;action.text.icon\&quot; class=\&quot;botui-icon botui-action-text-icon fa\&quot; :class=\&quot;\&#x27;fa-\&#x27; + action.text.icon\&quot;&gt;&lt;/i&gt; &lt;input type=\&quot;text\&quot; ref=\&quot;input\&quot; :type=\&quot;action.text.sub_type\&quot; v-model=\&quot;action.text.value\&quot; class=\&quot;botui-actions-text-input\&quot; :placeholder=\&quot;action.text.placeholder\&quot; :size=\&quot;action.text.size\&quot; :value=\&quot; action.text.value\&quot; :class=\&quot;action.text.cssClass\&quot; required v-focus/&gt; &lt;button type=\&quot;submit\&quot; :class=\&quot;&#123;\&#x27;botui-actions-buttons-button\&#x27;: !!action.text.button, \&#x27;botui-actions-text-submit\&#x27;: !action.text.button&#125;\&quot;&gt;&lt;i v-if=\&quot;action.text.button &amp;&amp; action.text.button.icon\&quot; class=\&quot;botui-icon botui-action-button-icon fa\&quot; :class=\&quot;\&#x27;fa-\&#x27; + action.text.button.icon\&quot;&gt;&lt;/i&gt; &lt;span&gt;&#123;&#123;(action.text.button &amp;&amp; action.text.button.label) || \&#x27;Go\&#x27;&#125;&#125;&lt;/span&gt;&lt;/button&gt;&lt;/form&gt;&lt;form v-if=\&quot;action.type == \&#x27;select\&#x27;\&quot; class=\&quot;botui-actions-select\&quot; @submit.prevent=\&quot;handle_action_select()\&quot; :class=\&quot;action.cssClass\&quot;&gt;&lt;i v-if=\&quot;action.select.icon\&quot; class=\&quot;botui-icon botui-action-select-icon fa\&quot; :class=\&quot;\&#x27;fa-\&#x27; + action.select.icon\&quot;&gt;&lt;/i&gt;&lt;v-select v-if=\&quot;action.select.searchselect &amp;&amp; !action.select.multipleselect\&quot; v-model=\&quot;action.select.value\&quot; :value=\&quot;action.select.value\&quot; :placeholder=\&quot;action.select.placeholder\&quot; class=\&quot;botui-actions-text-searchselect\&quot; :label=\&quot;action.select.label\&quot; :options=\&quot;action.select.options\&quot;&gt;&lt;/v-select&gt;&lt;v-select v-else-if=\&quot;action.select.searchselect &amp;&amp; action.select.multipleselect\&quot; multiple v-model=\&quot;action.select.value\&quot; :value=\&quot;action.select.value\&quot; :placeholder=\&quot;action.select.placeholder\&quot; class=\&quot;botui-actions-text-searchselect\&quot; :label=\&quot;action.select.label\&quot; :options=\&quot;action.select.options\&quot;&gt;&lt;/v-select&gt; &lt;select v-else v-model=\&quot;action.select.value\&quot; class=\&quot;botui-actions-text-select\&quot; :placeholder=\&quot;action.select.placeholder\&quot; :size=\&quot;action.select.size\&quot; :class=\&quot;action.select.cssClass\&quot; required v-focus&gt;&lt;option v-for=\&quot;option in action.select.options\&quot; :class=\&quot;action.select.optionClass\&quot; v-bind:value=\&quot;option.value\&quot; :disabled=\&quot;(option.value == \&#x27;\&#x27;)?true:false\&quot; :selected=\&quot;(action.select.value == option.value)?\&#x27;selected\&#x27;:\&#x27;\&#x27;\&quot;&gt; &#123;&#123; option.text &#125;&#125;&lt;/option&gt;&lt;/select&gt; &lt;button type=\&quot;submit\&quot; :class=\&quot;&#123;\&#x27;botui-actions-buttons-button\&#x27;: !!action.select.button, \&#x27;botui-actions-select-submit\&#x27;: !action.select.button&#125;\&quot;&gt;&lt;i v-if=\&quot;action.select.button &amp;&amp; action.select.button.icon\&quot; class=\&quot;botui-icon botui-action-button-icon fa\&quot; :class=\&quot;\&#x27;fa-\&#x27; + action.select.button.icon\&quot;&gt;&lt;/i&gt; &lt;span&gt;&#123;&#123;(action.select.button &amp;&amp; action.select.button.label) || \&#x27;Ok\&#x27;&#125;&#125;&lt;/span&gt;&lt;/button&gt;&lt;/form&gt;&lt;div v-if=\&quot;action.type == \&#x27;button\&#x27;\&quot; class=\&quot;botui-actions-buttons\&quot; :class=\&quot;action.cssClass\&quot;&gt; &lt;button type=\&quot;button\&quot; :class=\&quot;button.cssClass\&quot; class=\&quot;botui-actions-buttons-button\&quot; v-botui-scroll v-for=\&quot;button in action.button.buttons\&quot; @click=\&quot;handle_action_button(button)\&quot;&gt;&lt;i v-if=\&quot;button.icon\&quot; class=\&quot;botui-icon botui-action-button-icon fa\&quot; :class=\&quot;\&#x27;fa-\&#x27; + button.icon\&quot;&gt;&lt;/i&gt; &#123;&#123;button.text&#125;&#125;&lt;/button&gt;&lt;/div&gt;&lt;form v-if=\&quot;action.type == \&#x27;buttontext\&#x27;\&quot; class=\&quot;botui-actions-text\&quot; @submit.prevent=\&quot;handle_action_text()\&quot; :class=\&quot;action.cssClass\&quot;&gt;&lt;i v-if=\&quot;action.text.icon\&quot; class=\&quot;botui-icon botui-action-text-icon fa\&quot; :class=\&quot;\&#x27;fa-\&#x27; + action.text.icon\&quot;&gt;&lt;/i&gt; &lt;input type=\&quot;text\&quot; ref=\&quot;input\&quot; :type=\&quot;action.text.sub_type\&quot; v-model=\&quot;action.text.value\&quot; class=\&quot;botui-actions-text-input\&quot; :placeholder=\&quot;action.text.placeholder\&quot; :size=\&quot;action.text.size\&quot; :value=\&quot;action.text.value\&quot; :class=\&quot;action.text.cssClass\&quot; required v-focus/&gt; &lt;button type=\&quot;submit\&quot; :class=\&quot;&#123;\&#x27;botui-actions-buttons-button\&#x27;: !!action.text.button, \&#x27;botui-actions-text-submit\&#x27;: !action.text.button&#125;\&quot;&gt;&lt;i v-if=\&quot;action.text.button &amp;&amp; action.text.button.icon\&quot; class=\&quot;botui-icon botui-action-button-icon fa\&quot; :class=\&quot;\&#x27;fa-\&#x27; + action.text.button.icon\&quot;&gt;&lt;/i&gt; &lt;span&gt;&#123;&#123;(action.text.button &amp;&amp; action.text.button.label) || \&#x27;Go\&#x27;&#125;&#125;&lt;/span&gt;&lt;/button&gt;&lt;div class=\&quot;botui-actions-buttons\&quot; :class=\&quot;action.cssClass\&quot;&gt; &lt;button type=\&quot;button\&quot; :class=\&quot;button.cssClass\&quot; class=\&quot;botui-actions-buttons-button\&quot; v-for=\&quot;button in action.button.buttons\&quot; @click=\&quot;handle_action_button(button)\&quot; autofocus&gt;&lt;i v-if=\&quot;button.icon\&quot; class=\&quot;botui-icon botui-action-button-icon fa\&quot; :class=\&quot;\&#x27;fa-\&#x27; + button.icon\&quot;&gt;&lt;/i&gt; &#123;&#123;button.text&#125;&#125;&lt;/button&gt;&lt;/div&gt;&lt;/form&gt;&lt;/div&gt;&lt;/transition&gt;&lt;/div&gt;&lt;/div&gt;&#x27;</span>, <span class="comment">// replaced by HTML template during build. see Gulpfile.js</span></span><br><span class="line">      <span class="attr">data</span>: <span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">        <span class="keyword">return</span> &#123;</span><br><span class="line">          <span class="attr">action</span>: &#123;</span><br><span class="line">            <span class="attr">text</span>: &#123;</span><br><span class="line">              <span class="attr">size</span>: <span class="number">30</span>,</span><br><span class="line">              <span class="attr">placeholder</span>: <span class="string">&#x27;Write here ..&#x27;</span></span><br><span class="line">            &#125;,</span><br><span class="line">            <span class="attr">button</span>: &#123;&#125;,</span><br><span class="line">            <span class="attr">show</span>: <span class="literal">false</span>,</span><br><span class="line">            <span class="attr">type</span>: <span class="string">&#x27;text&#x27;</span>,</span><br><span class="line">            <span class="attr">autoHide</span>: <span class="literal">true</span>,</span><br><span class="line">            <span class="attr">addMessage</span>: <span class="literal">true</span></span><br><span class="line">          &#125;,</span><br><span class="line">          <span class="attr">messages</span>: []</span><br><span class="line">        &#125;;</span><br><span class="line">      &#125;,</span><br><span class="line">      <span class="attr">computed</span>: &#123;</span><br><span class="line">        <span class="attr">isMobile</span>: <span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">          <span class="keyword">return</span> root.<span class="property">innerWidth</span> &amp;&amp; root.<span class="property">innerWidth</span> &lt;= <span class="number">768</span>;</span><br><span class="line">        &#125;</span><br><span class="line">      &#125;,</span><br><span class="line">    	<span class="attr">methods</span>: &#123;</span><br><span class="line">    		<span class="attr">handle_action_button</span>: <span class="keyword">function</span> (<span class="params">button</span>) &#123;</span><br><span class="line">          <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; <span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">button</span>.<span class="property">buttons</span>.<span class="property">length</span>; i++) &#123;</span><br><span class="line">            <span class="keyword">if</span>(<span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">button</span>.<span class="property">buttons</span>[i].<span class="property">value</span> == button.<span class="property">value</span> &amp;&amp; <span class="title function_">typeof</span>(<span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">button</span>.<span class="property">buttons</span>[i].<span class="property">event</span>) == <span class="string">&#x27;function&#x27;</span>) &#123;</span><br><span class="line">              <span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">button</span>.<span class="property">buttons</span>[i].<span class="title function_">event</span>(button);</span><br><span class="line">              <span class="keyword">if</span> (<span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">button</span>.<span class="property">buttons</span>[i].<span class="property">actionStop</span>) <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line">              <span class="keyword">break</span>;</span><br><span class="line">            &#125;</span><br><span class="line">          &#125;</span><br><span class="line"></span><br><span class="line">          <span class="title function_">_handleAction</span>(button.<span class="property">text</span>);</span><br><span class="line"></span><br><span class="line">          <span class="keyword">var</span> defaultActionObj = &#123;</span><br><span class="line">            <span class="attr">type</span>: <span class="string">&#x27;button&#x27;</span>,</span><br><span class="line">            <span class="attr">text</span>: button.<span class="property">text</span>,</span><br><span class="line">            <span class="attr">value</span>: button.<span class="property">value</span></span><br><span class="line">          &#125;;</span><br><span class="line"></span><br><span class="line">          <span class="keyword">for</span> (<span class="keyword">var</span> eachProperty <span class="keyword">in</span> button) &#123;</span><br><span class="line">            <span class="keyword">if</span> (button.<span class="title function_">hasOwnProperty</span>(eachProperty)) &#123;</span><br><span class="line">              <span class="keyword">if</span> (eachProperty !== <span class="string">&#x27;type&#x27;</span> &amp;&amp; eachProperty !== <span class="string">&#x27;text&#x27;</span> &amp;&amp; eachProperty !== <span class="string">&#x27;value&#x27;</span>) &#123;</span><br><span class="line">                defaultActionObj[eachProperty] = button[eachProperty];</span><br><span class="line">              &#125;</span><br><span class="line">            &#125;</span><br><span class="line">          &#125;</span><br><span class="line"></span><br><span class="line">          <span class="title function_">_actionResolve</span>(defaultActionObj);</span><br><span class="line">    		&#125;,</span><br><span class="line">    		<span class="attr">handle_action_text</span>: <span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">    			<span class="keyword">if</span>(!<span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">text</span>.<span class="property">value</span>) <span class="keyword">return</span>;</span><br><span class="line">          <span class="title function_">_handleAction</span>(<span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">text</span>.<span class="property">value</span>);</span><br><span class="line">    			<span class="title function_">_actionResolve</span>(&#123;</span><br><span class="line">            <span class="attr">type</span>: <span class="string">&#x27;text&#x27;</span>,</span><br><span class="line">            <span class="attr">value</span>: <span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">text</span>.<span class="property">value</span></span><br><span class="line">          &#125;);</span><br><span class="line">    			<span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">text</span>.<span class="property">value</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">    		&#125;,</span><br><span class="line">        <span class="attr">handle_action_select</span>: <span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">          <span class="keyword">if</span>(<span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">searchselect</span> &amp;&amp; !<span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">multipleselect</span>) &#123;</span><br><span class="line">            <span class="keyword">if</span>(!<span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">value</span>.<span class="property">value</span>) <span class="keyword">return</span>;</span><br><span class="line">            <span class="title function_">_handleAction</span>(<span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">value</span>[<span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">label</span>]);</span><br><span class="line">            <span class="title function_">_actionResolve</span>(&#123;</span><br><span class="line">              <span class="attr">type</span>: <span class="string">&#x27;text&#x27;</span>,</span><br><span class="line">              <span class="attr">value</span>: <span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">value</span>.<span class="property">value</span>,</span><br><span class="line">              <span class="attr">text</span>: <span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">value</span>.<span class="property">text</span>,</span><br><span class="line">              <span class="attr">obj</span>: <span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">value</span></span><br><span class="line">            &#125;);</span><br><span class="line">          &#125;</span><br><span class="line">          <span class="keyword">if</span>(<span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">searchselect</span> &amp;&amp; <span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">multipleselect</span>) &#123;</span><br><span class="line">            <span class="keyword">if</span>(!<span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">value</span>) <span class="keyword">return</span>;</span><br><span class="line">            <span class="keyword">var</span> values = <span class="keyword">new</span> <span class="title class_">Array</span>();</span><br><span class="line">            <span class="keyword">var</span> labels = <span class="keyword">new</span> <span class="title class_">Array</span>();</span><br><span class="line">            <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; <span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">value</span>.<span class="property">length</span>; i++) &#123;</span><br><span class="line">              values.<span class="title function_">push</span>(<span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">value</span>[i].<span class="property">value</span>);</span><br><span class="line">              labels.<span class="title function_">push</span>(<span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">value</span>[i][<span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">label</span>]);</span><br><span class="line">            &#125;</span><br><span class="line">            <span class="title function_">_handleAction</span>(labels.<span class="title function_">join</span>(<span class="string">&#x27;, &#x27;</span>));</span><br><span class="line">            <span class="title function_">_actionResolve</span>(&#123;</span><br><span class="line">              <span class="attr">type</span>: <span class="string">&#x27;text&#x27;</span>,</span><br><span class="line">              <span class="attr">value</span>: values.<span class="title function_">join</span>(<span class="string">&#x27;, &#x27;</span>),</span><br><span class="line">              <span class="attr">text</span>: labels.<span class="title function_">join</span>(<span class="string">&#x27;, &#x27;</span>),</span><br><span class="line">              <span class="attr">obj</span>: <span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">value</span></span><br><span class="line">            &#125;);</span><br><span class="line">          &#125;</span><br><span class="line">          <span class="keyword">else</span> &#123;</span><br><span class="line">            <span class="keyword">if</span>(!<span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">value</span>) <span class="keyword">return</span>;</span><br><span class="line">            <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; <span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">options</span>.<span class="property">length</span>; i++) &#123; <span class="comment">// Find select title</span></span><br><span class="line">              <span class="keyword">if</span> (<span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">options</span>[i].<span class="property">value</span> == <span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">value</span>) &#123;</span><br><span class="line">                <span class="title function_">_handleAction</span>(<span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">options</span>[i].<span class="property">text</span>);</span><br><span class="line">                <span class="title function_">_actionResolve</span>(&#123;</span><br><span class="line">                  <span class="attr">type</span>: <span class="string">&#x27;text&#x27;</span>,</span><br><span class="line">                  <span class="attr">value</span>: <span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">value</span>,</span><br><span class="line">                  <span class="attr">text</span>: <span class="variable language_">this</span>.<span class="property">action</span>.<span class="property">select</span>.<span class="property">options</span>[i].<span class="property">text</span></span><br><span class="line">                &#125;);</span><br><span class="line">              &#125;</span><br><span class="line">            &#125;</span><br><span class="line">          &#125;</span><br><span class="line">        &#125;</span><br><span class="line">    	&#125;</span><br><span class="line">    &#125;;</span><br><span class="line"></span><br><span class="line">    root.<span class="property">Vue</span>.<span class="title function_">directive</span>(<span class="string">&#x27;botui-markdown&#x27;</span>, <span class="keyword">function</span> (<span class="params">el, binding</span>) &#123;</span><br><span class="line">      <span class="keyword">if</span>(binding.<span class="property">value</span> == <span class="string">&#x27;false&#x27;</span>) <span class="keyword">return</span>; <span class="comment">// v-botui-markdown=&quot;false&quot;</span></span><br><span class="line">      el.<span class="property">innerHTML</span> = <span class="title function_">_parseMarkDown</span>(el.<span class="property">textContent</span>);</span><br><span class="line">    &#125;);</span><br><span class="line"></span><br><span class="line">    root.<span class="property">Vue</span>.<span class="title function_">directive</span>(<span class="string">&#x27;botui-scroll&#x27;</span>, &#123;</span><br><span class="line">      <span class="attr">inserted</span>: <span class="keyword">function</span> (<span class="params">el</span>) &#123;</span><br><span class="line">        _container.<span class="property">scrollTop</span> = _container.<span class="property">scrollHeight</span>;</span><br><span class="line">        <span class="comment">// 弹弹乐问题定位</span></span><br><span class="line">	el.<span class="title function_">scrollIntoView</span>(&#123;<span class="attr">behavior</span>: <span class="string">&quot;smooth&quot;</span>, <span class="attr">block</span>: <span class="string">&quot;center&quot;</span>, <span class="attr">inline</span>: <span class="string">&quot;nearest&quot;</span>&#125;);</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;);</span><br><span class="line"></span><br><span class="line">    root.<span class="property">Vue</span>.<span class="title function_">directive</span>(<span class="string">&#x27;focus&#x27;</span>, &#123;</span><br><span class="line">      <span class="attr">inserted</span>: <span class="keyword">function</span> (<span class="params">el</span>) &#123;</span><br><span class="line">        el.<span class="title function_">focus</span>();</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;);</span><br><span class="line"></span><br><span class="line">    root.<span class="property">Vue</span>.<span class="title function_">directive</span>(<span class="string">&#x27;botui-container&#x27;</span>, &#123;</span><br><span class="line">      <span class="attr">inserted</span>: <span class="keyword">function</span> (<span class="params">el</span>) &#123;</span><br><span class="line">        _container = el;</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;);</span><br><span class="line"></span><br><span class="line">    _botApp = <span class="keyword">new</span> root.<span class="title class_">Vue</span>(&#123;</span><br><span class="line">      <span class="attr">components</span>: &#123;</span><br><span class="line">        <span class="string">&#x27;bot-ui&#x27;</span>: _botuiComponent</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;).$mount(<span class="string">&#x27;#&#x27;</span> + id);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> _instance = _botApp.<span class="property">$children</span>[<span class="number">0</span>]; <span class="comment">// to access the component&#x27;s data</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">function</span> <span class="title function_">_addMessage</span>(<span class="params">_msg</span>) &#123;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">if</span>(!_msg.<span class="property">loading</span> &amp;&amp; !_msg.<span class="property">content</span>) &#123;</span><br><span class="line">        <span class="keyword">throw</span> <span class="title class_">Error</span>(<span class="string">&#x27;BotUI: &quot;content&quot; is required in a non-loading message object.&#x27;</span>);</span><br><span class="line">      &#125;</span><br><span class="line"></span><br><span class="line">      _msg.<span class="property">type</span> = _msg.<span class="property">type</span> || <span class="string">&#x27;text&#x27;</span>;</span><br><span class="line">      _msg.<span class="property">visible</span> = (_msg.<span class="property">delay</span> || _msg.<span class="property">loading</span>) ? <span class="literal">false</span> : <span class="literal">true</span>;</span><br><span class="line">      <span class="keyword">var</span> _index = _instance.<span class="property">messages</span>.<span class="title function_">push</span>(_msg) - <span class="number">1</span>;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">Promise</span>(<span class="keyword">function</span> (<span class="params">resolve, reject</span>) &#123;</span><br><span class="line">        <span class="built_in">setTimeout</span>(<span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">          <span class="keyword">if</span>(_msg.<span class="property">delay</span>) &#123;</span><br><span class="line">            _msg.<span class="property">visible</span> = <span class="literal">true</span>;</span><br><span class="line"></span><br><span class="line">            <span class="keyword">if</span>(_msg.<span class="property">loading</span>) &#123;</span><br><span class="line">              _msg.<span class="property">loading</span> = <span class="literal">false</span>;</span><br><span class="line">            &#125;</span><br><span class="line">          &#125;</span><br><span class="line">          <span class="title function_">resolve</span>(_index);</span><br><span class="line">        &#125;, _msg.<span class="property">delay</span> || <span class="number">0</span>);</span><br><span class="line">      &#125;);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">function</span> <span class="title function_">_checkOpts</span>(<span class="params">_opts</span>) &#123;</span><br><span class="line">      <span class="keyword">if</span>(<span class="keyword">typeof</span> _opts === <span class="string">&#x27;string&#x27;</span>) &#123;</span><br><span class="line">        _opts = &#123;</span><br><span class="line">          <span class="attr">content</span>: _opts</span><br><span class="line">        &#125;;</span><br><span class="line">      &#125;</span><br><span class="line">      <span class="keyword">return</span> _opts || &#123;&#125;;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    _interface.<span class="property">message</span> =  &#123;</span><br><span class="line">      <span class="attr">add</span>: <span class="keyword">function</span> (<span class="params">addOpts</span>) &#123;</span><br><span class="line">        <span class="keyword">return</span> <span class="title function_">_addMessage</span>( <span class="title function_">_checkOpts</span>(addOpts) );</span><br><span class="line">      &#125;,</span><br><span class="line">      <span class="attr">bot</span>: <span class="keyword">function</span> (<span class="params">addOpts</span>) &#123;</span><br><span class="line">        addOpts = <span class="title function_">_checkOpts</span>(addOpts);</span><br><span class="line">        <span class="keyword">return</span> <span class="title function_">_addMessage</span>(addOpts);</span><br><span class="line">      &#125;,</span><br><span class="line">      <span class="attr">human</span>: <span class="keyword">function</span> (<span class="params">addOpts</span>) &#123;</span><br><span class="line">        addOpts = <span class="title function_">_checkOpts</span>(addOpts);</span><br><span class="line">        addOpts.<span class="property">human</span> = <span class="literal">true</span>;</span><br><span class="line">        <span class="keyword">return</span> <span class="title function_">_addMessage</span>(addOpts);</span><br><span class="line">      &#125;,</span><br><span class="line">      <span class="attr">get</span>: <span class="keyword">function</span> (<span class="params">index</span>) &#123;</span><br><span class="line">        <span class="keyword">return</span> <span class="title class_">Promise</span>.<span class="title function_">resolve</span>(_instance.<span class="property">messages</span>[index]);</span><br><span class="line">      &#125;,</span><br><span class="line">      <span class="attr">remove</span>: <span class="keyword">function</span> (<span class="params">index</span>) &#123;</span><br><span class="line">        _instance.<span class="property">messages</span>.<span class="title function_">splice</span>(index, <span class="number">1</span>);</span><br><span class="line">        <span class="keyword">return</span> <span class="title class_">Promise</span>.<span class="title function_">resolve</span>();</span><br><span class="line">      &#125;,</span><br><span class="line">      <span class="attr">update</span>: <span class="keyword">function</span> (<span class="params">index, msg</span>) &#123; <span class="comment">// only content can be updated, not the message type.</span></span><br><span class="line">        <span class="keyword">var</span> _msg = _instance.<span class="property">messages</span>[index];</span><br><span class="line">        _msg.<span class="property">content</span> = msg.<span class="property">content</span>;</span><br><span class="line">        _msg.<span class="property">visible</span> = !msg.<span class="property">loading</span>;</span><br><span class="line">        _msg.<span class="property">loading</span> = !!msg.<span class="property">loading</span>;</span><br><span class="line">        <span class="keyword">return</span> <span class="title class_">Promise</span>.<span class="title function_">resolve</span>(msg.<span class="property">content</span>);</span><br><span class="line">      &#125;,</span><br><span class="line">      <span class="attr">removeAll</span>: <span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">        _instance.<span class="property">messages</span>.<span class="title function_">splice</span>(<span class="number">0</span>, _instance.<span class="property">messages</span>.<span class="property">length</span>);</span><br><span class="line">        <span class="keyword">return</span> <span class="title class_">Promise</span>.<span class="title function_">resolve</span>();</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">function</span> <span class="title function_">mergeAtoB</span>(<span class="params">objA, objB</span>) &#123;</span><br><span class="line">      <span class="keyword">for</span> (<span class="keyword">var</span> prop <span class="keyword">in</span> objA) &#123;</span><br><span class="line">        <span class="keyword">if</span> (!objB.<span class="title function_">hasOwnProperty</span>(prop)) &#123;</span><br><span class="line">          objB[prop] = objA[prop];</span><br><span class="line">        &#125;</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">function</span> <span class="title function_">_checkAction</span>(<span class="params">_opts</span>) &#123;</span><br><span class="line">      <span class="keyword">if</span>(!_opts.<span class="property">action</span> &amp;&amp; !_opts.<span class="property">actionButton</span>  &amp;&amp; !_opts.<span class="property">actionText</span>) &#123;</span><br><span class="line">        <span class="keyword">throw</span> <span class="title class_">Error</span>(<span class="string">&#x27;BotUI: &quot;action&quot; property is required.&#x27;</span>);</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">function</span> <span class="title function_">_showActions</span>(<span class="params">_opts</span>) &#123;</span><br><span class="line"></span><br><span class="line">      <span class="title function_">_checkAction</span>(_opts);</span><br><span class="line"></span><br><span class="line">      <span class="title function_">mergeAtoB</span>(&#123;</span><br><span class="line">        <span class="attr">type</span>: <span class="string">&#x27;text&#x27;</span>,</span><br><span class="line">        <span class="attr">cssClass</span>: <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">        <span class="attr">autoHide</span>: <span class="literal">true</span>,</span><br><span class="line">        <span class="attr">addMessage</span>: <span class="literal">true</span></span><br><span class="line">      &#125;, _opts);</span><br><span class="line"></span><br><span class="line">      _instance.<span class="property">action</span>.<span class="property">type</span> = _opts.<span class="property">type</span>;</span><br><span class="line">      _instance.<span class="property">action</span>.<span class="property">cssClass</span> = _opts.<span class="property">cssClass</span>;</span><br><span class="line">      _instance.<span class="property">action</span>.<span class="property">autoHide</span> = _opts.<span class="property">autoHide</span>;</span><br><span class="line">      _instance.<span class="property">action</span>.<span class="property">addMessage</span> = _opts.<span class="property">addMessage</span>;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">Promise</span>(<span class="keyword">function</span>(<span class="params">resolve, reject</span>) &#123;</span><br><span class="line">        _actionResolve = resolve; <span class="comment">// resolved when action is performed, i.e: button clicked, text submitted, etc.</span></span><br><span class="line">        <span class="built_in">setTimeout</span>(<span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">          _instance.<span class="property">action</span>.<span class="property">show</span> = <span class="literal">true</span>;</span><br><span class="line">        &#125;, _opts.<span class="property">delay</span> || <span class="number">0</span>);</span><br><span class="line">      &#125;);</span><br><span class="line">    &#125;;</span><br><span class="line"></span><br><span class="line">    _interface.<span class="property">action</span> = &#123;</span><br><span class="line">      <span class="attr">show</span>: _showActions,</span><br><span class="line">      <span class="attr">hide</span>: <span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">        _instance.<span class="property">action</span>.<span class="property">show</span> = <span class="literal">false</span>;</span><br><span class="line">        <span class="keyword">return</span> <span class="title class_">Promise</span>.<span class="title function_">resolve</span>();</span><br><span class="line">      &#125;,</span><br><span class="line">      <span class="attr">text</span>: <span class="keyword">function</span> (<span class="params">_opts</span>) &#123;</span><br><span class="line">        <span class="title function_">_checkAction</span>(_opts);</span><br><span class="line">        _instance.<span class="property">action</span>.<span class="property">text</span> = _opts.<span class="property">action</span>;</span><br><span class="line">        <span class="keyword">return</span> <span class="title function_">_showActions</span>(_opts);</span><br><span class="line">      &#125;,</span><br><span class="line">      <span class="attr">button</span>: <span class="keyword">function</span> (<span class="params">_opts</span>) &#123;</span><br><span class="line">        <span class="title function_">_checkAction</span>(_opts);</span><br><span class="line">        _opts.<span class="property">type</span> = <span class="string">&#x27;button&#x27;</span>;</span><br><span class="line">        _instance.<span class="property">action</span>.<span class="property">button</span>.<span class="property">buttons</span> = _opts.<span class="property">action</span>;</span><br><span class="line">        <span class="keyword">return</span> <span class="title function_">_showActions</span>(_opts);</span><br><span class="line">      &#125;,</span><br><span class="line">      <span class="attr">select</span>: <span class="keyword">function</span> (<span class="params">_opts</span>) &#123;</span><br><span class="line">        <span class="title function_">_checkAction</span>(_opts);</span><br><span class="line">        _opts.<span class="property">type</span> = <span class="string">&#x27;select&#x27;</span>;</span><br><span class="line">        _opts.<span class="property">action</span>.<span class="property">label</span> = _opts.<span class="property">action</span>.<span class="property">label</span> || <span class="string">&#x27;text&#x27;</span>;</span><br><span class="line">        _opts.<span class="property">action</span>.<span class="property">value</span> = _opts.<span class="property">action</span>.<span class="property">value</span> || <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">        _opts.<span class="property">action</span>.<span class="property">searchselect</span> = <span class="keyword">typeof</span> _opts.<span class="property">action</span>.<span class="property">searchselect</span> !== <span class="string">&#x27;undefined&#x27;</span> ? _opts.<span class="property">action</span>.<span class="property">searchselect</span> : _options.<span class="property">searchselect</span>;</span><br><span class="line">        _opts.<span class="property">action</span>.<span class="property">multipleselect</span> = _opts.<span class="property">action</span>.<span class="property">multipleselect</span> || <span class="literal">false</span>;</span><br><span class="line">        <span class="keyword">if</span> (_opts.<span class="property">action</span>.<span class="property">searchselect</span> &amp;&amp; <span class="title function_">typeof</span>(_opts.<span class="property">action</span>.<span class="property">value</span>) == <span class="string">&#x27;string&#x27;</span>) &#123;</span><br><span class="line">          <span class="keyword">if</span> (!_opts.<span class="property">action</span>.<span class="property">multipleselect</span>) &#123;</span><br><span class="line">            <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; _opts.<span class="property">action</span>.<span class="property">options</span>.<span class="property">length</span>; i++) &#123; <span class="comment">// Find object</span></span><br><span class="line">              <span class="keyword">if</span> (_opts.<span class="property">action</span>.<span class="property">options</span>[i].<span class="property">value</span> == _opts.<span class="property">action</span>.<span class="property">value</span>) &#123;</span><br><span class="line">                _opts.<span class="property">action</span>.<span class="property">value</span> = _opts.<span class="property">action</span>.<span class="property">options</span>[i]</span><br><span class="line">              &#125;</span><br><span class="line">            &#125;</span><br><span class="line">          &#125;</span><br><span class="line">          <span class="keyword">else</span> &#123;</span><br><span class="line">            <span class="keyword">var</span> vals = _opts.<span class="property">action</span>.<span class="property">value</span>.<span class="title function_">split</span>(<span class="string">&#x27;,&#x27;</span>);</span><br><span class="line">            _opts.<span class="property">action</span>.<span class="property">value</span> = <span class="keyword">new</span> <span class="title class_">Array</span>();</span><br><span class="line">            <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; _opts.<span class="property">action</span>.<span class="property">options</span>.<span class="property">length</span>; i++) &#123; <span class="comment">// Find object</span></span><br><span class="line">              <span class="keyword">for</span> (<span class="keyword">var</span> j = <span class="number">0</span>; j &lt; vals.<span class="property">length</span>; j++) &#123; <span class="comment">// Search values</span></span><br><span class="line">                <span class="keyword">if</span> (_opts.<span class="property">action</span>.<span class="property">options</span>[i].<span class="property">value</span> == vals[j]) &#123;</span><br><span class="line">                  _opts.<span class="property">action</span>.<span class="property">value</span>.<span class="title function_">push</span>(_opts.<span class="property">action</span>.<span class="property">options</span>[i]);</span><br><span class="line">                &#125;</span><br><span class="line">              &#125;</span><br><span class="line">            &#125;</span><br><span class="line">          &#125;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">if</span> (!_opts.<span class="property">action</span>.<span class="property">searchselect</span>) &#123; _opts.<span class="property">action</span>.<span class="property">options</span>.<span class="title function_">unshift</span>(&#123;<span class="attr">value</span>:<span class="string">&#x27;&#x27;</span>,text : _opts.<span class="property">action</span>.<span class="property">placeholder</span>&#125;); &#125;</span><br><span class="line">        _instance.<span class="property">action</span>.<span class="property">button</span> = _opts.<span class="property">action</span>.<span class="property">button</span>;</span><br><span class="line">        _instance.<span class="property">action</span>.<span class="property">select</span> = _opts.<span class="property">action</span>;</span><br><span class="line">        <span class="keyword">return</span> <span class="title function_">_showActions</span>(_opts);</span><br><span class="line">      &#125;,</span><br><span class="line">      <span class="attr">buttontext</span>: <span class="keyword">function</span> (<span class="params">_opts</span>) &#123;</span><br><span class="line">        <span class="title function_">_checkAction</span>(_opts);</span><br><span class="line">        _opts.<span class="property">type</span> = <span class="string">&#x27;buttontext&#x27;</span>;</span><br><span class="line">        _instance.<span class="property">action</span>.<span class="property">button</span>.<span class="property">buttons</span> = _opts.<span class="property">actionButton</span>;</span><br><span class="line">        _instance.<span class="property">action</span>.<span class="property">text</span> = _opts.<span class="property">actionText</span>;</span><br><span class="line">        <span class="keyword">return</span> <span class="title function_">_showActions</span>(_opts);</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span>(_options.<span class="property">fontawesome</span>) &#123;</span><br><span class="line">      <span class="title function_">loadScript</span>(_fontAwesome);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span>(_options.<span class="property">searchselect</span>) &#123;</span><br><span class="line">      <span class="title function_">loadScript</span>(_searchselect, <span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">        <span class="title class_">Vue</span>.<span class="title function_">component</span>(<span class="string">&#x27;v-select&#x27;</span>, <span class="title class_">VueSelect</span>.<span class="property">VueSelect</span>);</span><br><span class="line">      &#125;);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span>(_options.<span class="property">debug</span>) &#123;</span><br><span class="line">      _interface.<span class="property">_botApp</span> = _botApp; <span class="comment">// current Vue instance</span></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> _interface;</span><br><span class="line">  &#125;);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> <span class="title class_">BotUI</span>;</span><br><span class="line"></span><br><span class="line">&#125;));</span><br></pre></td></tr></table></figure></li><li><p>botui_init.js</p><div class="note info flat"><p>这个是整个项目的关键，聊天内容全部在这里进行设计，此处仅以我的项目作为示例，可以参阅botui的github仓库查阅使用文档，或者在我的项目上进行内容修改。</p></div><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">function</span> <span class="title function_">botui_init</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> botui = <span class="keyword">new</span> <span class="title class_">BotUI</span>(<span class="string">&quot;hello-akilar&quot;</span>);</span><br><span class="line">  botui.<span class="property">message</span>.<span class="title function_">add</span>(&#123;</span><br><span class="line">    <span class="attr">delay</span>: <span class="number">800</span>,</span><br><span class="line">    <span class="attr">content</span>: <span class="string">&quot;Hi, 欢迎光临Akilarの糖果屋😊&quot;</span></span><br><span class="line">  &#125;).<span class="title function_">then</span>(<span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">    botui.<span class="property">message</span>.<span class="title function_">add</span>(&#123;</span><br><span class="line">      <span class="attr">delay</span>: <span class="number">1100</span>,</span><br><span class="line">      <span class="attr">content</span>: <span class="string">&quot;我是店长Akilar😄&quot;</span></span><br><span class="line">    &#125;).<span class="title function_">then</span>(<span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">      botui.<span class="property">message</span>.<span class="title function_">add</span>(&#123;</span><br><span class="line">        <span class="attr">delay</span>: <span class="number">1100</span>,</span><br><span class="line">        <span class="attr">content</span>: <span class="string">&quot;你也可以叫我Aki~😋&quot;</span></span><br><span class="line">      &#125;).<span class="title function_">then</span>(<span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">        botui.<span class="property">action</span>.<span class="title function_">button</span>(&#123;</span><br><span class="line">          <span class="attr">delay</span>: <span class="number">1600</span>,</span><br><span class="line">          <span class="attr">action</span>: [&#123;</span><br><span class="line">            <span class="attr">text</span>: <span class="string">&quot;我想知道更多关于糖果屋的故事!😃&quot;</span>,</span><br><span class="line">            <span class="attr">value</span>: <span class="string">&quot;sure&quot;</span></span><br><span class="line">          &#125;, &#123;</span><br><span class="line">            <span class="attr">text</span>: <span class="string">&quot;好的，就这样吧，拜拜！🙄&quot;</span>,</span><br><span class="line">            <span class="attr">value</span>: <span class="string">&quot;skip&quot;</span></span><br><span class="line">          &#125;]</span><br><span class="line">        &#125;).<span class="title function_">then</span>(<span class="keyword">function</span>(<span class="params">a</span>) &#123;</span><br><span class="line">          <span class="string">&quot;sure&quot;</span> == a.<span class="property">value</span> &amp;&amp; <span class="title function_">sure</span>();</span><br><span class="line">          <span class="string">&quot;skip&quot;</span> == a.<span class="property">value</span> &amp;&amp; <span class="title function_">end</span>()</span><br><span class="line">        &#125;)</span><br><span class="line">      &#125;)</span><br><span class="line">    &#125;)</span><br><span class="line">  &#125;);</span><br><span class="line">  <span class="keyword">var</span> sure = <span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">      botui.<span class="property">message</span>.<span class="title function_">add</span>(&#123;</span><br><span class="line">        <span class="attr">delay</span>: <span class="number">600</span>,</span><br><span class="line">        <span class="attr">content</span>: <span class="string">&quot;🎉🎉🎉🎉🎉🎉&quot;</span></span><br><span class="line">      &#125;).<span class="title function_">then</span>(<span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">        <span class="title function_">secondpart</span>()</span><br><span class="line">      &#125;)</span><br><span class="line">    &#125;,</span><br><span class="line">    end = <span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">      botui.<span class="property">message</span>.<span class="title function_">add</span>(&#123;</span><br><span class="line">        <span class="attr">delay</span>: <span class="number">600</span>,</span><br><span class="line">        <span class="attr">content</span>: <span class="string">&quot;w(ﾟДﾟ)w 不要走！再看看嘛！&quot;</span></span><br><span class="line">      &#125;)</span><br><span class="line">    &#125;,</span><br><span class="line">    secondpart = <span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">      botui.<span class="property">message</span>.<span class="title function_">add</span>(&#123;</span><br><span class="line">        <span class="attr">delay</span>: <span class="number">5000</span>,</span><br><span class="line">        <span class="attr">content</span>: <span class="string">&quot;首先呢，很感谢您肯在这里驻足片刻❤️。Akilarの糖果屋是一个个人性质的博客，我会在这里发表各种各样的内容。&quot;</span></span><br><span class="line">      &#125;).<span class="title function_">then</span>(<span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">        botui.<span class="property">message</span>.<span class="title function_">add</span>(&#123;</span><br><span class="line">          <span class="attr">delay</span>: <span class="number">15000</span>,</span><br><span class="line">          <span class="attr">content</span>: <span class="string">&quot;起这个名字是因为想到了安卓的命名方式，安卓历代版本都用甜品的名字命名🍰，例如9是Pineapple cake(菠萝蛋糕)🍰，8是Oreo(奥利奥)🍩，那我干脆就甜到底了。因此可以看到我的分类里面都是糖。之后就发现了一个很纠结的问题，除了巧克力，我想不到其他的不带糖字的糖果。当然了，无伤大雅。才怪咯！超难受的好么！偏偏我那么喜欢巧克力🍫，我是不会把它删掉的。&quot;</span></span><br><span class="line">        &#125;).<span class="title function_">then</span>(<span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">          botui.<span class="property">message</span>.<span class="title function_">add</span>(&#123;</span><br><span class="line">            <span class="attr">delay</span>: <span class="number">5000</span>,</span><br><span class="line">            <span class="attr">content</span>: <span class="string">&quot;分类也有一点我的恶趣味在。👀&quot;</span></span><br><span class="line">          &#125;).<span class="title function_">then</span>(<span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">            botui.<span class="property">message</span>.<span class="title function_">add</span>(&#123;</span><br><span class="line">              <span class="attr">delay</span>: <span class="number">8000</span>,</span><br><span class="line">              <span class="attr">content</span>: <span class="string">&quot;比如巧克力是Ubuntu的教程，棉花糖是windows的教程，糖葫芦就是各种通用教程啦！🎉&quot;</span></span><br><span class="line">            &#125;).<span class="title function_">then</span>(<span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">              botui.<span class="property">message</span>.<span class="title function_">add</span>(&#123;</span><br><span class="line">                <span class="attr">delay</span>: <span class="number">5000</span>,</span><br><span class="line">                <span class="attr">content</span>: <span class="string">&quot;泡泡糖是个人日记哦，流水账一样的，不要看，很羞耻的。😶&quot;</span></span><br><span class="line">              &#125;).<span class="title function_">then</span>(<span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">                botui.<span class="property">message</span>.<span class="title function_">add</span>(&#123;</span><br><span class="line">                  <span class="attr">delay</span>: <span class="number">4000</span>,</span><br><span class="line">                  <span class="attr">content</span>: <span class="string">&quot;我个人最推荐的是太妃糖版块哦，这里可都是我引以为豪的作品呢💝！马卡龙酌情观看吧，长篇连载对我来说是个挑战，很可能断更。👻&quot;</span></span><br><span class="line">                &#125;).<span class="title function_">then</span>(<span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">                  botui.<span class="property">action</span>.<span class="title function_">button</span>(&#123;</span><br><span class="line">                    <span class="attr">delay</span>: <span class="number">1100</span>,</span><br><span class="line">                    <span class="attr">action</span>: [&#123;</span><br><span class="line">                      <span class="attr">text</span>: <span class="string">&quot;为什么叫Akilarの糖果屋呢？🤔&quot;</span>,</span><br><span class="line">                      <span class="attr">value</span>: <span class="string">&quot;why-mashiro&quot;</span></span><br><span class="line">                    &#125;]</span><br><span class="line">                  &#125;).<span class="title function_">then</span>(<span class="keyword">function</span>(<span class="params">a</span>) &#123;</span><br><span class="line">                    <span class="title function_">thirdpart</span>()</span><br><span class="line">                  &#125;)</span><br><span class="line">                &#125;)</span><br><span class="line">              &#125;)</span><br><span class="line">            &#125;)</span><br><span class="line">          &#125;)</span><br><span class="line">        &#125;)</span><br><span class="line">      &#125;)</span><br><span class="line">    &#125;,</span><br><span class="line">    thirdpart = <span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">      botui.<span class="property">message</span>.<span class="title function_">add</span>(&#123;</span><br><span class="line">        <span class="attr">delay</span>: <span class="number">1e3</span>,</span><br><span class="line">        <span class="attr">content</span>: <span class="string">&quot;诶？Akilar是我的英文名啊😏，糖果屋，emm🤔，大概是因为我在现实中也很想开一家糖果屋吧。&quot;</span></span><br><span class="line">      &#125;).<span class="title function_">then</span>(<span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">        botui.<span class="property">action</span>.<span class="title function_">button</span>(&#123;</span><br><span class="line">          <span class="attr">delay</span>: <span class="number">1500</span>,</span><br><span class="line">          <span class="attr">action</span>: [&#123;</span><br><span class="line">            <span class="attr">text</span>: <span class="string">&quot;😲，那英文名为什么叫Akilar呢？&quot;</span>,</span><br><span class="line">            <span class="attr">value</span>: <span class="string">&quot;why-cat&quot;</span></span><br><span class="line">          &#125;]</span><br><span class="line">        &#125;).<span class="title function_">then</span>(<span class="keyword">function</span>(<span class="params">a</span>) &#123;</span><br><span class="line">          <span class="title function_">fourthpart</span>()</span><br><span class="line">        &#125;)</span><br><span class="line">      &#125;)</span><br><span class="line">    &#125;,</span><br><span class="line">    fourthpart = <span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">      botui.<span class="property">message</span>.<span class="title function_">add</span>(&#123;</span><br><span class="line">        <span class="attr">delay</span>: <span class="number">3000</span>,</span><br><span class="line">        <span class="attr">content</span>: <span class="string">&quot;这个是因为我的名字的释义用日文发音，其中有一节是Akira，用英文谐音拼写就是Akilar了 &quot;</span></span><br><span class="line">      &#125;).<span class="title function_">then</span>(<span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">        botui.<span class="property">message</span>.<span class="title function_">add</span>(&#123;</span><br><span class="line">          <span class="attr">delay</span>: <span class="number">3000</span>,</span><br><span class="line">          <span class="attr">content</span>: <span class="string">&quot;灵感来自于刀剑神域~&quot;</span></span><br><span class="line">        &#125;).<span class="title function_">then</span>(<span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">          botui.<span class="property">action</span>.<span class="title function_">button</span>(&#123;</span><br><span class="line">            <span class="attr">delay</span>: <span class="number">1500</span>,</span><br><span class="line">            <span class="attr">action</span>: [&#123;</span><br><span class="line">              <span class="attr">text</span>: <span class="string">&quot;方便透露一下真名吗？👀&quot;</span>,</span><br><span class="line">              <span class="attr">value</span>: <span class="string">&quot;why-domain&quot;</span></span><br><span class="line">            &#125;]</span><br><span class="line">          &#125;).<span class="title function_">then</span>(<span class="keyword">function</span>(<span class="params">a</span>) &#123;</span><br><span class="line">            <span class="title function_">fifthpart</span>()</span><br><span class="line">          &#125;)</span><br><span class="line">        &#125;)</span><br><span class="line">      &#125;)</span><br><span class="line">    &#125;,</span><br><span class="line">    fifthpart = <span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">      botui.<span class="property">message</span>.<span class="title function_">add</span>(&#123;</span><br><span class="line">        <span class="attr">delay</span>: <span class="number">5000</span>,</span><br><span class="line">        <span class="attr">content</span>: <span class="string">&quot;emmmm,流水幽吟绕耳边，煦风馨语抚心弦，挥臂欲揽冰钩月，银星斟酌醉人涎~&quot;</span></span><br><span class="line">      &#125;).<span class="title function_">then</span>(<span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line">        botui.<span class="property">message</span>.<span class="title function_">add</span>(&#123;</span><br><span class="line">          <span class="attr">delay</span>: <span class="number">3000</span>,</span><br><span class="line">          <span class="attr">content</span>: <span class="string">&quot;只是一介无名小卒而已^_^&quot;</span></span><br><span class="line">        &#125;)</span><br><span class="line">      &#125;)</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></li></ul></li><li><p>修改<code>~\[blogroot]\_config.butterfly.yml</code>,注意对齐格式。</p><figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br></pre></td><td class="code"><pre><span class="line">    aside:</span><br><span class="line">      enable: true</span><br><span class="line">      mobile: false # display on mobile</span><br><span class="line">      position: right # left or right</span><br><span class="line">      card_author:</span><br><span class="line">        enable: true</span><br><span class="line">        description:</span><br><span class="line">        button:</span><br><span class="line">          icon:</span><br><span class="line">          text:</span><br><span class="line">          link:</span><br><span class="line"><span class="addition">+     card_botui:</span></span><br><span class="line"><span class="addition">+         enable: true #侧栏聊天窗口</span></span><br><span class="line">      card_announcement:</span><br><span class="line">        enable: true</span><br><span class="line"></span><br><span class="line">    inject:</span><br><span class="line">      head:</span><br><span class="line">        # 侧栏聊天窗口</span><br><span class="line"><span class="addition">+       - &lt;link rel=&quot;stylesheet&quot; href=&quot;/css/card_botui.css&quot; /&gt;</span></span><br><span class="line">      bottom:</span><br><span class="line"><span class="addition">+       # vue.js依赖</span></span><br><span class="line"><span class="addition">+       - &lt;script src=&quot;https://npm.elemecdn.com/vue@2.6.11&quot;&gt;&lt;/script&gt;</span></span><br><span class="line"><span class="addition">+       # 侧栏聊天窗</span></span><br><span class="line"><span class="addition">+       - &lt;script src=&quot;/js/botui.js&quot;&gt;&lt;/script&gt;</span></span><br><span class="line"><span class="addition">+       - &lt;script data-pjax src=&quot;/js/botui_init.js&quot;&gt;&lt;/script&gt;</span></span><br></pre></td></tr></table></figure></li><li><p>在<code>~\[blogroot]\themes\butterfly\languages\zh-CN.yml</code>中添加相应译名</p><figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">    aside:</span><br><span class="line">      articles: 文章</span><br><span class="line">      tags: 标签</span><br><span class="line">      categories: 分类</span><br><span class="line">      Link: 友人帐</span><br><span class="line"><span class="addition">+     card_botui: 聊天窗</span></span><br><span class="line">      card_announcement: 告示牌</span><br><span class="line">      card_categories: 分类</span><br><span class="line">      card_tags: 标签</span><br><span class="line">      card_archives: 时间轴</span><br><span class="line">      card_recent_post: 最新文章</span><br><span class="line">      card_webinfo:</span><br></pre></td></tr></table></figure></li></ol><h2 id="可能遇到的bug"><a href="#可能遇到的bug" class="headerlink" title="可能遇到的bug"></a>可能遇到的bug</h2><ol><li><p>无法显示</p><ul><li>botui.js依赖vue.js，添加依赖即可。（教程已更新相关内容）<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">  inject:</span><br><span class="line">    head:</span><br><span class="line">    bottom:</span><br><span class="line"><span class="addition">+     # vue.js依赖</span></span><br><span class="line"><span class="addition">+     - &lt;script src=&quot;https://npm.elemecdn.com/vue@2.6.11&quot;&gt;&lt;/script&gt;</span></span><br></pre></td></tr></table></figure></li></ul></li><li><p>切换页面侧栏就变成空白</p><ul><li>添加pjax重载(仅限于butterfly主题)<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">  inject:</span><br><span class="line">    head:</span><br><span class="line">    bottom:</span><br><span class="line"><span class="deletion">-     - &lt;script src=&quot;/js/botui_init.js&quot;&gt;&lt;/script&gt;</span></span><br><span class="line"><span class="addition">+     - &lt;script data-pjax src=&quot;/js/botui_init.js&quot;&gt;&lt;/script&gt;</span></span><br></pre></td></tr></table></figure></li></ul></li></ol></article><div class="post-copyright"><div class="post-copyright__title"><span class="post-copyright-info"><h>Botui Talk Robot</h></span></div><div class="post-copyright__type"><span class="post-copyright-info"><a href="https://akilar.top/posts/9dc1acf8/">https://akilar.top/posts/9dc1acf8/</a></span></div><div class="post-copyright-m"><div class="post-copyright-m-info"><div class="post-copyright-a"><h>作者</h><div class="post-copyright-cc-info"><h>Akilar</h></div></div><div class="post-copyright-c"><h>发布于</h><div class="post-copyright-cc-info"><h>2020-10-22</h></div></div><div class="post-copyright-u"><h>更新于</h><div class="post-copyright-cc-info"><h>2021-01-31</h></div></div><div class="post-copyright-c"><h>许可协议</h><div class="post-copyright-cc-info"><a class="icon" rel="noopener external nofollow noreferrer" target="_blank" title="Creative Commons" href="https://creativecommons.org/"><i class="fab fa-creative-commons"></i></a><a rel="noopener external nofollow noreferrer" target="_blank" title="CC BY-NC-SA 4.0" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a></div></div></div></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/%F0%9F%93%81Hexo/">📁Hexo</a><a class="post-meta__tags" href="/tags/%F0%9F%A6%8BButterfly/">🦋Butterfly</a></div><div class="post_share"></div></div><link rel="stylesheet" href="https://npm.elemecdn.com/akiblog@1.0.1/css/coin.css" media="defer" onload='this.media="all"'><div class="post-reward"><button class="tip-button reward-button"><span class="tip-button__text">不给糖果就捣蛋</span><div class="coin-wrapper"><div class="coin"><div class="coin__middle"></div><div class="coin__back"></div><div class="coin__front"></div></div></div><div class="reward-main"><ul class="reward-all"><li class="reward-item"><a href="https://npm.elemecdn.com/akiblog@1.0.1/img/wechat.png" rel="external nofollow noreferrer" target="_blank"><img class="post-qr-code-img" src="" data-lazy-src="https://npm.elemecdn.com/akiblog@1.0.1/img/wechat.png" alt="wechat"></a><div class="post-qr-code-desc">wechat</div></li><li class="reward-item"><a href="https://npm.elemecdn.com/akiblog@1.0.1/img/alipay.png" rel="external nofollow noreferrer" target="_blank"><img class="post-qr-code-img" src="" data-lazy-src="https://npm.elemecdn.com/akiblog@1.0.1/img/alipay.png" alt="alipay"></a><div class="post-qr-code-desc">alipay</div></li></ul></div></button></div><audio id="coinAudio" src="https://npm.elemecdn.com/akilar-candyassets/audio/aowu.m4a"></audio><script defer src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/coin.js"></script><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="javascript:void(0);" rel="external nofollow noreferrer" onclick="SAONotify(&quot;Prev Post&quot;,&quot;是否跳转至上一篇：&lt;br&gt;二级域名的活用方法&quot;,&quot;pjax.loadUrl('/posts/8250e594/')&quot;)" title="二级域名的活用方法"><i class="fas fa-chevron-left prev-icon"><div class="prev-label">上一篇</div></i></a><div class="pagination-card"><img class="prev-cover" src="" data-lazy-src="https://img.zcool.cn/community/01f28461e1626511013f01cd1d05d8.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100" onerror='onerror=null,src="https://npm.elemecdn.com/akiblog@1.0.1/img/loading.gif"' alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">二级域名的活用方法</div></div></div></div><div class="next-post pull-right"><a href="javascript:void(0);" rel="external nofollow noreferrer" onclick="SAONotify(&quot;Next Post&quot;,&quot;是否跳转至下一篇：&lt;br&gt;Butterfly主题美化日记&quot;,&quot;pjax.loadUrl('/posts/f99b208/')&quot;)" title="Butterfly主题美化日记"><i class="fas fa-chevron-right next-icon"><div class="next-label">下一篇</div></i></a><div class="pagination-card"><img class="next-cover" src="" data-lazy-src="https://img.zcool.cn/community/0125fe61e57b6111013e8cd04af4a2.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100" onerror='onerror=null,src="https://npm.elemecdn.com/akiblog@1.0.1/img/loading.gif"' alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">Butterfly主题美化日记</div></div></div></div></nav><div class="business-center"><div class="business-card"><div class="business-flip"><div class="business-front"><div class="business-strip-bottom"></div><div class="business-strip-top"></div><img class="business-logo" width="80" height="80" src="" data-lazy-src="https://npm.elemecdn.com/akiblog@1.0.1/img/cardcode.png" alt="cardcode"><div class="business-Invitation">Invitation</div><div class="business-chip"><div class="business-chip-line"></div><div class="business-chip-line"></div><div class="business-chip-line"></div><div class="business-chip-line"></div><div class="business-chip-main"></div></div><svg class="business-wave" viewBox="0 3.71 26.959 38.787" width="26.959" height="38.787" fill="white"><path d="M19.709 3.719c.266.043.5.187.656.406 4.125 5.207 6.594 11.781 6.594 18.938 0 7.156-2.469 13.73-6.594 18.937-.195.336-.57.531-.957.492a.9946.9946 0 0 1-.851-.66c-.129-.367-.035-.777.246-1.051 3.855-4.867 6.156-11.023 6.156-17.718 0-6.696-2.301-12.852-6.156-17.719-.262-.317-.301-.762-.102-1.121.204-.36.602-.559 1.008-.504z"></path><path d="M13.74 7.563c.231.039.442.164.594.343 3.508 4.059 5.625 9.371 5.625 15.157 0 5.785-2.113 11.097-5.625 15.156-.363.422-1 .472-1.422.109-.422-.363-.472-1-.109-1.422 3.211-3.711 5.156-8.551 5.156-13.843 0-5.293-1.949-10.133-5.156-13.844-.27-.309-.324-.75-.141-1.114.188-.367.578-.582.985-.542h.093z"></path><path d="M7.584 11.438c.227.031.438.144.594.312 2.953 2.863 4.781 6.875 4.781 11.313 0 4.433-1.828 8.449-4.781 11.312-.398.387-1.035.383-1.422-.016-.387-.398-.383-1.035.016-1.421 2.582-2.504 4.187-5.993 4.187-9.875 0-3.883-1.605-7.372-4.187-9.875-.321-.282-.426-.739-.266-1.133.164-.395.559-.641.984-.617h.094zM1.178 15.531c.121.02.238.063.344.125 2.633 1.414 4.437 4.215 4.437 7.407 0 3.195-1.797 5.996-4.437 7.406-.492.258-1.102.07-1.36-.422-.257-.492-.07-1.102.422-1.359 2.012-1.075 3.375-3.176 3.375-5.625 0-2.446-1.371-4.551-3.375-5.625-.441-.204-.676-.692-.551-1.165.122-.468.567-.785 1.051-.742h.094z"></path></svg><div class="business-card-number"><div class="business-section">Akilar</div><div class="business-section">589330978</div></div><div class="business-end"><span class="business-end-text">created:</span><span class="business-end-date">14/10/2022</span></div><div class="business-card-holder">Welcome to Candyhome</div><div class="business-master"><div class="business-circle business-master-red"></div><div class="business-circle business-master-yellow"></div></div></div><div class="business-back"><div class="business-strip-black"></div><div class="business-ccv"><label>sitelink</label><div><a target="_blank" rel="noopener external nofollow noreferrer" href="https://jq.qq.com/?_wv=1027&k=5o4Iga8D">加入群聊【🧊Akilarの糖果屋🍭】</a></div></div><div class="business-terms"><p>Use this card to join the candyhome and participate in a pleasant discussion together .</p><p>Welcome to Akilar's candyhome,wish you a nice day .</p></div></div></div></div></div><hr><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i> <span>评论</span></div></div><div class="comment-wrap"><div><div id="twikoo-wrap"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-author"><div class="item-headline"><i class="fa-solid fa-circle-user"></i><span>作者信息</span></div><div class="author-main-content"><div class="author-check-content"><label class="author-info" for="author-info"><input id="author-info" type="checkbox" name="author-info"><div class="author-avatar"><img src="" data-lazy-src="https://npm.elemecdn.com/akiblog@1.0.1/img/author.webp" onerror='this.onerror=null,this.src="https://npm.elemecdn.com/akiblog@1.0.1/img/404.gif"' alt="avatar"></div><div class="author-name">Akilar</div></label></div><div class="author-switch-content"><input class="switch-content" type="radio" name="switch-content" value="description"><label class="author-description-box"><div class="author-description">流水幽吟绕耳边，<br>煦风馨语抚心弦，<br>挥臂欲揽冰钩月，<br>银星斟酌醉人涎。</div></label><input class="switch-content" type="radio" name="switch-content" value="social" checked><label class="author-social-box"><a class="card-author-button" target="_blank" rel="noopener external nofollow noreferrer" href="https://jq.qq.com/?_wv=1027&amp;k=tNuEdliQ"><i class="fa fa-paper-plane faa-tada"></i><span>加入糖果屋群聊</span></a><div class="social-icons"><a class="social-icon faa-parent animated-hover" href="https://github.com/Akilarlxh" rel="external nofollow noreferrer" target="_blank" title="Github"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-identity-01"></use></svg></a><a class="social-icon faa-parent animated-hover" href="mailto:Akilarlxh@gmail.com" rel="external nofollow noreferrer" target="_blank" title="Email"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-Openmail-01"></use></svg></a><a class="social-icon faa-parent animated-hover" href="https://space.bilibili.com/22976782" rel="external nofollow noreferrer" target="_blank" title="Bilibili"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-film-01"></use></svg></a><a class="social-icon faa-parent animated-hover" href="https://music.163.com/#/user/home?id=292643778" rel="external nofollow noreferrer" target="_blank" title="Cloudmusic"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-songlist-01"></use></svg></a><a class="social-icon faa-parent animated-hover" href="/atom.xml" target="_blank" title="RSS"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-pushpin-01"></use></svg></a></div></label><input class="switch-content" type="radio" name="switch-content" value="site-data"><label class="author-data-box"><div class="site-data"><a class="data-item" href="/archives/"><div class="data-name">文章</div><div class="data-length">480</div></a><a class="data-item" href="/tags/"><div class="data-name">标签</div><div class="data-length">63</div></a><a class="data-item" href="/categories/"><div class="data-name">分类</div><div class="data-length">6</div></a></div></label></div></div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#botui-js%E7%AE%80%E4%BB%8B"><span class="toc-number">1.</span> <span class="toc-text">botui.js简介</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%9D%99%E6%80%81%E8%B5%84%E6%BA%90%E4%B8%8B%E8%BD%BD"><span class="toc-number">2.</span> <span class="toc-text">静态资源下载</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%BF%AE%E6%94%B9%E6%AD%A5%E9%AA%A4"><span class="toc-number">3.</span> <span class="toc-text">修改步骤</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8F%AF%E8%83%BD%E9%81%87%E5%88%B0%E7%9A%84bug"><span class="toc-number">4.</span> <span class="toc-text">可能遇到的bug</span></a></li></ol></div></div><div class="card-widget card-recommend-post"><div class="item-headline"><i class="fas fa-dharmachakra"></i><span>相关推荐</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/posts/f08df520/" title="重写了一个侧栏作者卡片。搭配侧栏卡片修改一起使用。"><img src="" data-lazy-src="https://img.zcool.cn/community/01a6b161e1626511013f01cd9953a2.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100" alt="重写了一个侧栏作者卡片。搭配侧栏卡片修改一起使用。"></a><div class="content"><a class="title" href="/posts/f08df520/" title="源计划-方舟：作者卡片">源计划-方舟：作者卡片</a><time datetime="2022-12-31" title="发表于 2022-12-31">2022-12-31</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/70bdebb6/" title="新版的赛博风格侧栏版块，不包括作者卡片，作者卡片准备单独写"><img src="" data-lazy-src="https://img.zcool.cn/community/0183d061dd8ce511013e8cd04451eb.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100" alt="新版的赛博风格侧栏版块，不包括作者卡片，作者卡片准备单独写"></a><div class="content"><a class="title" href="/posts/70bdebb6/" title="源计划-方舟：侧栏卡片样式修改">源计划-方舟：侧栏卡片样式修改</a><time datetime="2022-12-25" title="发表于 2022-12-25">2022-12-25</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/89a3474c/" title="给电脑端和手机端分别写了款侧栏按钮样式。也可以自己挑其中之一全局应用。"><img src="" data-lazy-src="https://img.zcool.cn/community/01729c61dd8ce711013f01cd0f12a3.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100" alt="给电脑端和手机端分别写了款侧栏按钮样式。也可以自己挑其中之一全局应用。"></a><div class="content"><a class="title" href="/posts/89a3474c/" title="源计划-方舟：侧栏按钮样式修改">源计划-方舟：侧栏按钮样式修改</a><time datetime="2022-12-26" title="发表于 2022-12-26">2022-12-26</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/934cd448/" title="侧栏标签卡片和标签页面改动。换成存储卡样式。"><img src="" data-lazy-src="https://img.zcool.cn/community/01729c61dd8ce711013f01cd0f12a3.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100" alt="侧栏标签卡片和标签页面改动。换成存储卡样式。"></a><div class="content"><a class="title" href="/posts/934cd448/" title="源计划-方舟：存储卡样式标签">源计划-方舟：存储卡样式标签</a><time datetime="2023-01-04" title="发表于 2023-01-04">2023-01-04</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/3e4b194c/" title="试做中较为满意的标题样式风格，单独发文"><img src="" data-lazy-src="https://img.zcool.cn/community/0125fe61e57b6111013e8cd04af4a2.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100" alt="试做中较为满意的标题样式风格，单独发文"></a><div class="content"><a class="title" href="/posts/3e4b194c/" title="源计划-方舟：标题样式修改">源计划-方舟：标题样式修改</a><time datetime="2022-12-25" title="发表于 2022-12-25">2022-12-25</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/3b78b69a/" title="给Butterfly魔改的内容添加pjax适配。得益于已经有内置的方法函数，可以快速配置。"><img src="" data-lazy-src="https://img.zcool.cn/community/01ad1261e1626511013e8cd01221da.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,q_100" alt="给Butterfly魔改的内容添加pjax适配。得益于已经有内置的方法函数，可以快速配置。"></a><div class="content"><a class="title" href="/posts/3b78b69a/" title="Butterfly的Pjax适配方案">Butterfly的Pjax适配方案</a><time datetime="2020-11-18" title="发表于 2020-11-18">2020-11-18</time></div></div></div></div></div></div></main><footer id="footer"><div id="ark-footer-wraper"><div class="ark-footer-container"><div class="ark-footer-left-corner"><div id="ark-footer-bdage-container"><div class="ark-footer-bdage swiper-wrapper"><a class="ark-bdage-item swiper-slide" href="https://hexo.io/" rel="external nofollow noreferrer" title="博客框架为Hexo_v6.2.0" target="_blank"><svg class="icon ark-decoration" aria-hidden="true"><use xlink:href="#icon-hexo"></use></svg><span>Frame-Hexo</span></a><a class="ark-bdage-item swiper-slide" href="https://butterfly.js.org/" rel="external nofollow noreferrer" title="主题版本Butterfly_v4.4.0" target="_blank"><svg class="icon ark-decoration" aria-hidden="true"><use xlink:href="#icon-Butterfly"></use></svg><span>Theme-Butterfly</span></a><a class="ark-bdage-item swiper-slide" href="https://www.jsdelivr.com/" rel="external nofollow noreferrer" title="本站使用JsDelivr为静态资源提供CDN加速" target="_blank"><svg class="icon ark-decoration" aria-hidden="true"><use xlink:href="#icon-jsdelivr"></use></svg><span>CDN-jsDelivr</span></a><a class="ark-bdage-item swiper-slide" href="https://console.dogecloud.com/" rel="external nofollow noreferrer" title="本网站由多吉云提供CDN加速服务" target="_blank"><svg class="icon ark-decoration" aria-hidden="true"><use xlink:href="#icon-DOGE"></use></svg><span>CDN-dogecloud</span></a><a class="ark-bdage-item swiper-slide" href="https://beian.miit.gov.cn" title="本站已在工信部备案，备案号浙ICP备-2021026687号" target="_blank"><svg class="icon ark-decoration" aria-hidden="true"><use xlink:href="#icon-a-255_icp-license"></use></svg><span>ICP-2021026687-1</span></a><a class="ark-bdage-item swiper-slide" href="https://icp.gov.moe/?keyword=20212887" title="本站已加入萌ICP豪华套餐，萌ICP备20212887号" target="_blank"><svg class="icon ark-decoration" aria-hidden="true"><use xlink:href="#icon-space_demo_equipment"></use></svg><span>moeICP-20212887</span></a><a class="ark-bdage-item swiper-slide" href="https://www.netlify.com/" rel="external nofollow noreferrer" title="本站默认线路托管于Netlify" target="_blank"><svg class="icon ark-decoration" aria-hidden="true"><use xlink:href="#icon-netlify"></use></svg><span>Hosted-Netlify</span></a><a class="ark-bdage-item swiper-slide" href="https://github.com/" rel="external nofollow noreferrer" title="本站项目由Github托管" target="_blank"><svg class="icon ark-decoration" aria-hidden="true"><use xlink:href="#icon-GitHub"></use></svg><span>Source-Github</span></a><a class="ark-bdage-item swiper-slide" href="http://creativecommons.org/licenses/by-nc-sa/4.0/" rel="external nofollow noreferrer" title="本站采用知识共享署名-非商业性使用-相同方式共享4.0国际许可协议进行许可" target="_blank"><svg class="icon ark-decoration" aria-hidden="true"><use xlink:href="#icon-copyright"></use></svg><span>Copyright-BY-NC-SA-4</span></a></div></div><div class="ark-footer-copyright">&copy;2016 - 2023 By Akilar</div><a class="ark-footer-record" target="_blank" rel="noopener" href="https://beian.miit.gov.cn" title="浙ICP备-2021026687号">浙ICP备-2021026687号</a></div><div class="ark-footer-right-corner"><div id="workboard"></div><script async src="/js/custom/runtime.js"></script></div></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open faa-pulse animated-hover"></i><span>阅读模式</span></button><button id="translateLink" type="button" title="简繁转换"><i>繁</i><span>简繁转换</span></button><a class="icon-V hidden" onclick="switchNightMode()" title="昼夜切换"><svg class="faa-pulse animated-hover" width="25" height="25" viewBox="0 0 1024 1024"><use id="modeicon" xlink:href="#icon-moon"></use></svg><span>昼夜切换</span></a><button id="hide-aside-btn" type="button" title="侧栏显隐"><i class="fas fa-arrows-alt-h faa-pulse animated-hover"></i><span>侧栏显隐</span></button><button id="SAO_Utils_Switch" type="button" title="右键开关" onclick="panelAudio(),SAOSwitch()"><i class="fas fa-mouse faa-pulse animated-hover"></i><span>右键开关</span></button><button id="SAO_Utils_Refresh" type="button" title="点击刷新" onclick="panelAudio(),fetchCommits()"><i class="fa-solid fa-arrows-rotate faa-pulse animated-hover"></i><span>点击刷新</span></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin faa-pulse animated-hover"></i><span>设置</span></button><button id="ranklist_show" type="button" title="打赏榜单" onclick="panelAudio(),RanklistBtn()"><i class="fas fa-fire-alt faa-pulse animated-hover"></i><span>打赏榜单</span></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul faa-pulse animated-hover"></i><span>目录</span></button><button id="chat_btn" type="button" title="与我联系"><i class="fas fa-sms faa-pulse animated-hover"></i><span>与我联系</span></button><button id="to_comment" type="button" title="直达评论" onclick="FixedCommentBtn()"><i class="fas fa-comments faa-pulse animated-hover"></i><span>直达评论</span></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up faa-pulse animated-hover"></i><span>回到顶部</span></button></div></div><div id="algolia-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="search-wrap"><div id="algolia-search-input"></div><hr><div id="algolia-search-results"><div id="algolia-hits"></div><div id="algolia-pagination"></div><div id="algolia-info"><div class="algolia-stats"></div><div class="algolia-poweredBy"></div></div></div></div></div><div id="search-mask"></div></div><div><script async src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/async.js"></script><script src="https://npm.elemecdn.com/akiblog@1.0.1/js/utils.js"></script><script src="https://npm.elemecdn.com/akiblog@1.0.1/js/main.js"></script><script defer src="https://npm.elemecdn.com/swiper@8.4.2/swiper-bundle.min.js"></script><script defer data-pjax src="/js/custom/swiper_init.js"></script><script src="https://npm.elemecdn.com/akiblog@1.0.1/js/tw_cn.js"></script><script src="https://npm.elemecdn.com/medium-zoom@1.0.6/dist/medium-zoom.min.js"></script><script src="https://npm.elemecdn.com/instant.page@5.1.1/instantpage.js" type="module"></script><script src="https://npm.elemecdn.com/vanilla-lazyload@17.3.1/dist/lazyload.iife.min.js"></script><script src="https://npm.elemecdn.com/node-snackbar@0.1.16/dist/snackbar.min.js"></script><script src="https://npm.elemecdn.com/algoliasearch@4.14.2/dist/algoliasearch-lite.umd.js"></script><script src="https://npm.elemecdn.com/instantsearch.js@4.44.0/dist/instantsearch.production.min.js"></script><script src="https://npm.elemecdn.com/akiblog@1.0.1/js/search/algolia.js"></script><div class="pjax-reload"><script async>var preloader={endLoading:()=>{if(document.body.style.overflow="auto",document.getElementById("loading-box").style.transition="opacity 3s",document.getElementById("loading-box").style.opacity="0",setTimeout((function(){document.getElementById("loading-box").classList.add("loaded")}),3e3),sessionStorage.getItem("isReload"))return!0;sessionStorage.setItem("isReload",!0),SAONotify("Welcome","欢迎光临糖果屋<br>愿你享受愉快的一天")},initLoading:()=>{document.body.style.overflow="",document.getElementById("loading-box").style.transition="",document.getElementById("loading-box").style.opacity="1",document.getElementById("loading-box").classList.remove("loaded")}};window.addEventListener("load",()=>{preloader.endLoading()}),document.getElementById("loading-box").addEventListener("click",()=>{preloader.endLoading()}),setTimeout((function(){preloader.endLoading()}),3e3)</script></div><div class="js-pjax"><script>(()=>{const t=()=>{twikoo.init(Object.assign({el:"#twikoo-wrap",envId:"https://twikoo-service.akilar.top",region:"",onCommentLoaded:function(){btf.loadLightbox(document.querySelectorAll("#twikoo .tk-content img:not(.tk-owo-emotion)"))}},null))},o=()=>{"object"!=typeof twikoo?getScript("https://npm.elemecdn.com/twikoo@1.6.5/dist/twikoo.all.min.js").then(t):setTimeout(t,0)};btf.loadComment(document.getElementById("twikoo-wrap"),o)})()</script></div><script>window.addEventListener("load",()=>{const e=e=>{let t="";if(e.length)for(let n=0;n<e.length;n++){t+="<div class='aside-list-item'>";{const a="data-lazy-src";t+=`<a href='${e[n].url}' class='thumbnail'><img ${a}='${e[n].avatar}' alt='${e[n].nick}'></a>`}t+=`<div class='content'>\n        <a class='comment' href='${e[n].url}' title='${e[n].content}'>${e[n].content}</a>\n        <div class='name'><span>${e[n].nick} / </span><time datetime="${e[n].date}">${btf.diffDate(e[n].date,!0)}</time></div>\n        </div></div>`}else t+="没有评论";let n=document.querySelector("#card-newest-comments .aside-list");n.innerHTML=t,window.lazyLoadInstance&&window.lazyLoadInstance.update(),window.pjax&&window.pjax.refresh(n)},t=()=>{if(document.querySelector("#card-newest-comments .aside-list")){const t=saveToLocal.get("twikoo-newest-comments");t?e(JSON.parse(t)):(()=>{const t=()=>{twikoo.getRecentComments({envId:"https://twikoo-service.akilar.top",region:"",pageSize:5,includeReply:!0}).then((function(t){const n=t.map(e=>{return{content:(t=e.comment,""===t||(t=(t=(t=(t=t.replace(/<img.*?src="(.*?)"?[^\>]+>/gi,"[图片]")).replace(/<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi,"[链接]")).replace(/<pre><code>.*?<\/pre>/gi,"[代码]")).replace(/<[^>]+>/g,"")).length>150&&(t=t.substring(0,150)+"..."),t),avatar:e.avatar,nick:e.nick,url:e.url+"#"+e.id,date:new Date(e.created).toISOString()};var t});saveToLocal.set("twikoo-newest-comments",JSON.stringify(n),10/1440),e(n)})).catch((function(e){document.querySelector("#card-newest-comments .aside-list").innerHTML="无法获取评论，请确认相关配置是否正确"}))};"object"==typeof twikoo?t():getScript("https://npm.elemecdn.com/twikoo@1.6.5/dist/twikoo.all.min.js").then(t)})()}};t(),document.addEventListener("pjax:complete",t)})</script><script src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/sun_moon.js" async></script><script async data-pjax src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/SAO-NAV.js"></script><script>WIDGET={CONFIG:{modules:"012",background:"5",tmpColor:"FFFFFF",tmpSize:"16",cityColor:"FFFFFF",citySize:"16",aqiColor:"FFFFFF",aqiSize:"16",weatherIconSize:"24",alertIconSize:"18",padding:"10px 10px 10px 10px",shadow:"0",language:"auto",fixed:"false",vertical:"top",horizontal:"left",key:"3da94e567f5e4e88baf90f066f0893c2"}}</script><script defer data-pjax src="https://widget.heweather.net/simple/static/js/he-simple.js?v=1.4.0"></script><script async src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/random.js"></script><script defer src="https://at.alicdn.com/t/c/font_3344355_e443xsjcmum.js"></script><script src="//code.tidio.co/wgamdwbirypo8casl6rjgtfbs47ny3s7.js" async></script><script>function onTidioChatApiReady(){window.tidioChatApi.hide(),window.tidioChatApi.on("close",(function(){window.tidioChatApi.hide()}))}window.tidioChatApi?window.tidioChatApi.on("ready",onTidioChatApiReady):document.addEventListener("tidioChat-ready",onTidioChatApiReady);var chatBtnFn=()=>{document.getElementById("chat_btn").addEventListener("click",(function(){window.tidioChatApi.show(),window.tidioChatApi.open()}))};chatBtnFn()</script><script src="https://npm.elemecdn.com/pjax@0.2.8/pjax.min.js"></script><script>let pjaxSelectors=["head > title","#config-diff","#body-wrap","#rightside-config-hide","#rightside-config-show",".js-pjax","#web_bg","#fixedcard-dashboard"];var pjax=new Pjax({elements:'a:not([target="_blank"])',selectors:pjaxSelectors,cacheBust:!1,analytics:!1,scrollRestoration:!1});document.addEventListener("pjax:send",(function(){if(window.tocScrollFn&&window.removeEventListener("scroll",window.tocScrollFn),window.scrollCollect&&window.removeEventListener("scroll",scrollCollect),"object"==typeof preloader&&preloader.initLoading(),document.getElementById("rightside").style.cssText="opacity: ''; transform: ''",window.aplayers)for(let e=0;e<window.aplayers.length;e++)window.aplayers[e].options.fixed||window.aplayers[e].destroy();"object"==typeof typed&&typed.destroy();const e=document.body.classList;e.contains("read-mode")&&e.remove("read-mode"),"object"==typeof disqusjs&&disqusjs.destroy()})),document.addEventListener("pjax:complete",(function(){window.refreshFn(),document.querySelectorAll("script[data-pjax], .pjax-reload script").forEach(e=>{const t=document.createElement("script"),o=e.text||e.textContent||e.innerHTML||"";Array.from(e.attributes).forEach(e=>t.setAttribute(e.name,e.value)),t.appendChild(document.createTextNode(o)),e.parentNode.replaceChild(t,e)}),GLOBAL_CONFIG.islazyload&&window.lazyLoadInstance.update(),"function"==typeof chatBtnFn&&chatBtnFn(),"function"==typeof panguInit&&panguInit(),"function"==typeof gtag&&gtag("config","",{page_path:window.location.pathname}),"object"==typeof _hmt&&_hmt.push(["_trackPageview",window.location.pathname]),"function"==typeof loadMeting&&document.getElementsByClassName("aplayer").length&&loadMeting(),"object"==typeof Prism&&Prism.highlightAll(),"object"==typeof preloader&&preloader.endLoading()})),document.addEventListener("pjax:error",e=>{404===e.request.status&&pjax.loadUrl("/404.html")})</script><script>"serviceWorker"in navigator&&(navigator.serviceWorker.controller&&navigator.serviceWorker.addEventListener("controllerchange",(function(){fetch("/json/commits.json").then(e=>e.json().then(e=>{for(var r=e,o=0;o<r.length;o++){r[o];var t=o+1+"."+r[o].commit.message;if(o<1)var n=t;else n=n+"<br>"+t}SAONotify("Latest Update",n,"location.reload(true);")})).catch(console.error)})),window.addEventListener("load",(function(){navigator.serviceWorker.register("/sw.js")})))</script><div id="SAO-back"><div id="SAO-menu"><div id="SAO-menu-content"><div class="utils-list"><div class="utils-list-item"><div class="user-panel" style="top:undefined"><div class="user-panel-name">Friends</div><div class="user-panel-img"><img src="" data-lazy-src="/img/info.png"></div><div class="user-panel-properties">Welcome to Akilar の Candyhome !</div></div><i class="fas fa-address-book" onclick="panelAudio(),UtilsClick()"></i><div class="menu-list" style="top:-83px"><div class="menu-list-item"><i class="fa fa-link" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/link/")}),500)'>Link</i></div><div class="menu-list-item"><i class="fas fa-fire-alt" onclick="clickAudio(),setTimeout((function(){SAOclose(),RanklistBtn()}),500)">Pantner</i></div></div></div><div class="utils-list-item"><div class="user-panel" style="top:undefined"><div class="user-panel-name">Help</div><div class="user-panel-img"><img src="" data-lazy-src="/img/info.png"></div><div class="user-panel-properties"><h4>Anything can I help you ?</h4><p>Tidio：开启在线聊天窗<br>Comment：直达评论区或留言板<br>Candyhome：加入糖果屋QQ群</p></div></div><i class="fa fa-question-circle" onclick="panelAudio(),UtilsClick()"></i><div class="menu-list" style="top:-103px"><div class="menu-list-item"><i class="fa fa-comment-dots" onclick="clickAudio(),setTimeout((function(){SAOclose(),openTidio()}),500)">Tidio</i></div><div class="menu-list-item"><i class="fa fa-comments" onclick="clickAudio(),setTimeout((function(){SAOclose(),FixedCommentBtn()}),500)">Comments</i></div><div class="menu-list-item"><i class="fa fa-user-friends" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("https://jq.qq.com/?_wv=1027&amp;k=a08BZRzs")}),500)'>Candyhome</i></div></div></div><div class="utils-list-item"><div class="user-panel" style="top:undefined"><div class="user-panel-name">Menu</div><div class="user-panel-img"><img src="" data-lazy-src="/img/info.png"></div><div class="user-panel-properties">The menu of my blog</div></div><i class="fa fa-tasks" onclick="panelAudio(),UtilsClick()"></i><div class="menu-list" style="top:-163px"><div class="menu-list-item"><i class="fa fa-home" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("https://blog.akilar.top/")}),500)'>Home</i></div><div class="menu-list-item"><i class="fa fa-folder-open" onclick="panelAudio(),MenusClick()">Document</i><div class="menu-child" style="top:-100px"><div class="menu-list-child"><i class="fa fa-file-invoice" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/posts/f99b208/")}),500)'>Beautify</i></div><div class="menu-list-child"><i class="fa fa-file-invoice" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/posts/7c16c4bb/")}),500)'>Optimize</i></div><div class="menu-list-child"><i class="fa fa-file-invoice" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/posts/615e2dec/")}),500)'>Tag_Plugins</i></div><div class="menu-list-child"><i class="fa fa-file-invoice" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/posts/6ef63e2d/")}),500)'>Construct</i></div></div></div><div class="menu-list-item"><i class="fa fa-blog" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/")}),500)'>Blog</i></div><div class="menu-list-item"><i class="fa fa-archive" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/archives/")}),500)'>Archives</i></div><div class="menu-list-item"><i class="fa fa-folder-open" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/categories/")}),500)'>Categoties</i></div><div class="menu-list-item"><i class="fa fa-tags" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/tags/")}),500)'>Tags</i></div></div></div><div class="utils-list-item"><div class="user-panel" style="top:undefined"><div class="user-panel-name">Options</div><div class="user-panel-img"><img src="" data-lazy-src="/img/info.png"></div><div class="user-panel-properties"><h4>Some userful scripts</h4><p>Random： 随机跳转站内文章<br>Search： 打开搜索窗口</p>Refresh： 刷新缓存</div></div><i class="fa fa-tools" onclick="panelAudio(),UtilsClick()"></i><div class="menu-list" style="top:-103px"><div class="menu-list-item"><i class="fa fa-random" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("/toRandomPost()")}),500)'>Random</i></div><div class="menu-list-item"><i class="fa fa-search" onclick="clickAudio(),setTimeout((function(){SAOclose(),openSearch()}),500)">Search</i></div><div class="menu-list-item"><i class="fa-solid fa-arrows-rotate" onclick='clickAudio(),setTimeout((function(){SAOclose(),SAONotify("Refresh","即将为您刷新页面缓存","location.reload(true);")}),500)'>Refresh</i></div></div></div><div class="utils-list-item"><div class="user-panel"><div class="user-panel-name">Instructions</div><div class="user-panel-img"><img src="" data-lazy-src="/img/siteicon/favicon.png"></div><div class="user-panel-properties"><h4>欢迎使用SAO_Utils_Web 2.0</h4><p>点按选项可以持续显示下级菜单。您可以通过按住<kbd>ctrl</kbd>+<kbd>右键</kbd>来恢复使用原生右键菜单，更多内容可点击右侧Option按钮访问教程或Help按钮加入糖果屋QQ群。</p><center>©Akilarの糖果屋</center></div></div><i class="fa fa-cog" onclick="panelAudio(),UtilsClick()"></i><div class="menu-list" style="top:-103px"><div class="menu-list-item"><i class="fa fa-tools" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("https://akilar.top/posts/fd243d7/")}),500)'>Option</i></div><div class="menu-list-item"><i class="fa fa-question-circle" onclick='clickAudio(),setTimeout((function(){SAOclose(),linkStart("https://jq.qq.com/?_wv=1027&amp;k=a08BZRzs")}),500)'>Help</i></div><div class="menu-list-item"><i class="fa fa-sign-out-alt" onclick="alertAudio(),openLogout()">Logout</i></div></div></div><div class="utils-list-item"><i class="fa fa-power-off" onclick="alertAudio(),SAOKeepOff()" title="永久关闭SAO右键菜单"></i></div></div></div></div></div><div id="SAO-logout"><div class="logout-title">Alert</div><div class="logout-alert">是否确认退出?</div><div class="logout-button"><span class="logout-confirm"><button class="far fa-circle" type="button" name="confirm" onclick="clickAudio(),confirmLogout()"></button></span><span class="logout-cancel"><button class="fa fa-times" type="button" name="cancel" onclick="panelAudio(),cancelLogout()"></button></span></div></div><audio id="SAOlauncher" src="https://npm.elemecdn.com/akilar-candyassets/audio/Launcher.mp3"></audio><audio id="SAOClick" src="https://npm.elemecdn.com/akilar-candyassets/audio/Click.mp3"></audio><audio id="SAOPanel" src="https://npm.elemecdn.com/akilar-candyassets/audio/Panel.mp3"></audio><audio id="SAOAlert" src="https://npm.elemecdn.com/akilar-candyassets/audio/Alert.mp3"></audio><script async src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/SAO_Menu.js"></script><div id="SAO-ranklist"><div class="ranklist-title">Rank list</div><div class="ranklist-main"><div class="master-item"><div class="master-rank"><i class="fa fa-plus" onclick="panelAudio(),RanklistBtn()"></i></div><div class="master-user"><a alt="" href="/">Akilar<div class="rank-reward"><div class="reward-img"><img alt="" src="" data-lazy-src="https://npm.elemecdn.com/akiblog@1.0.1/img/wechat.png"><a class="reward-text" alt="" href="/null">wechat</a></div><div class="reward-img"><img alt="" src="" data-lazy-src="https://npm.elemecdn.com/akiblog@1.0.1/img/alipay.png"><a class="reward-text" alt="" href="/null">alipay</a></div></div></a></div><div class="master-data"><div class="master-HP"><div class="HP-fill" style="width:20%"><div class="HP-fill-in"><span>20%</span></div></div></div></div><div class="master-level"><span>270</span><span>|</span><span>1350</span><span>lv.23</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢*蓓打赏的￥180">*蓓</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:100%"><div class="HP-fill-in"><span>100.00%</span></div></div></div></div><div class="partner-level"><span>9200</span><span>|</span><span>9200</span><span>lv.180</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢晨打赏的￥8.88">晨</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:88.86%"><div class="HP-fill-in"><span>88.86%</span></div></div></div></div><div class="partner-level"><span>622</span><span>|</span><span>700</span><span>lv.10</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://zfe.space/" data-title="感谢**鄂打赏的￥9.9">**鄂</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:13.76%"><div class="HP-fill-in"><span>13.76%</span></div></div></div></div><div class="partner-level"><span>523</span><span>|</span><span>3800</span><span>lv.72</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢*光打赏的￥50">*光</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:92.59%"><div class="HP-fill-in"><span>92.59%</span></div></div></div></div><div class="partner-level"><span>2685</span><span>|</span><span>2900</span><span>lv.54</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢*洁打赏的￥30">*洁</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:93.78%"><div class="HP-fill-in"><span>93.78%</span></div></div></div></div><div class="partner-level"><span>1688</span><span>|</span><span>1800</span><span>lv.32</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢**焘打赏的￥20">**焘</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:90.92%"><div class="HP-fill-in"><span>90.92%</span></div></div></div></div><div class="partner-level"><span>1182</span><span>|</span><span>1300</span><span>lv.22</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://szsyzx.github.io/" data-title="感谢懒蟲打赏的￥20">懒蟲</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:74.06%"><div class="HP-fill-in"><span>74.06%</span></div></div></div></div><div class="partner-level"><span>1148</span><span>|</span><span>1550</span><span>lv.27</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢*i打赏的￥10">*i</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:83.38%"><div class="HP-fill-in"><span>83.38%</span></div></div></div></div><div class="partner-level"><span>667</span><span>|</span><span>800</span><span>lv.12</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://www.acozycotage.net/" data-title="感谢acozycotage打赏的￥10">acozycotage</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:NaN%"><div class="HP-fill-in"><span>NaN%</span></div></div></div></div><div class="partner-level"><span>NaN</span><span>|</span><span>NaN</span><span>lv.undefined</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢*因打赏的￥10">*因</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:62.5%"><div class="HP-fill-in"><span>62.50%</span></div></div></div></div><div class="partner-level"><span>625</span><span>|</span><span>1000</span><span>lv.16</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢H*g打赏的￥10">H*g</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:83.38%"><div class="HP-fill-in"><span>83.38%</span></div></div></div></div><div class="partner-level"><span>667</span><span>|</span><span>800</span><span>lv.12</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢**宁打赏的￥10">**宁</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:45.46%"><div class="HP-fill-in"><span>45.46%</span></div></div></div></div><div class="partner-level"><span>591</span><span>|</span><span>1300</span><span>lv.22</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://www.nesxc.com/" data-title="感谢Nesxc打赏的￥14.88">Nesxc</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:74.42%"><div class="HP-fill-in"><span>74.42%</span></div></div></div></div><div class="partner-level"><span>893</span><span>|</span><span>1200</span><span>lv.20</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢J*y打赏的￥2.56">J*y</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:51.11%"><div class="HP-fill-in"><span>51.11%</span></div></div></div></div><div class="partner-level"><span>230</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://www.lbihua.cn" data-title="感谢哔哗打赏的￥10">哔哗</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:62.5%"><div class="HP-fill-in"><span>62.50%</span></div></div></div></div><div class="partner-level"><span>625</span><span>|</span><span>1000</span><span>lv.16</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://iori-yimaga.top" data-title="感谢T*0打赏的￥23.3">T*0</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:93.17%"><div class="HP-fill-in"><span>93.17%</span></div></div></div></div><div class="partner-level"><span>1351</span><span>|</span><span>1450</span><span>lv.25</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢**飞打赏的￥20">**飞</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:74.06%"><div class="HP-fill-in"><span>74.06%</span></div></div></div></div><div class="partner-level"><span>1148</span><span>|</span><span>1550</span><span>lv.27</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢**豪打赏的￥10">**豪</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:83.38%"><div class="HP-fill-in"><span>83.38%</span></div></div></div></div><div class="partner-level"><span>667</span><span>|</span><span>800</span><span>lv.12</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://www.keyiqingxin.cn" data-title="感谢清心打赏的￥3.88">清心</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:19.42%"><div class="HP-fill-in"><span>19.42%</span></div></div></div></div><div class="partner-level"><span>233</span><span>|</span><span>1200</span><span>lv.20</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢鹿栖打赏的￥20">鹿栖</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:74.06%"><div class="HP-fill-in"><span>74.06%</span></div></div></div></div><div class="partner-level"><span>1148</span><span>|</span><span>1550</span><span>lv.27</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://menglei.xyz" data-title="感谢*夢打赏的￥3">*夢</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:27.33%"><div class="HP-fill-in"><span>27.33%</span></div></div></div></div><div class="partner-level"><span>205</span><span>|</span><span>750</span><span>lv.11</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://www.ijinse.cn" data-title="感谢锦瑟打赏的￥50">锦瑟</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:69.45%"><div class="HP-fill-in"><span>69.45%</span></div></div></div></div><div class="partner-level"><span>2639</span><span>|</span><span>3800</span><span>lv.72</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://glann.vip" data-title="感谢glann打赏的￥5.01">glann</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:41.75%"><div class="HP-fill-in"><span>41.75%</span></div></div></div></div><div class="partner-level"><span>334</span><span>|</span><span>800</span><span>lv.12</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢**忠打赏的￥4.48">**忠</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:89.56%"><div class="HP-fill-in"><span>89.56%</span></div></div></div></div><div class="partner-level"><span>403</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://huran.xyz" data-title="感谢忽然打赏的￥13.14">忽然</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:87.58%"><div class="HP-fill-in"><span>87.58%</span></div></div></div></div><div class="partner-level"><span>832</span><span>|</span><span>950</span><span>lv.15</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢XueZha打赏的￥6.66">XueZha</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:66.57%"><div class="HP-fill-in"><span>66.57%</span></div></div></div></div><div class="partner-level"><span>466</span><span>|</span><span>700</span><span>lv.10</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢*葵打赏的￥6.66">*葵</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:66.57%"><div class="HP-fill-in"><span>66.57%</span></div></div></div></div><div class="partner-level"><span>466</span><span>|</span><span>700</span><span>lv.10</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://tianli-blog.club" data-title="感谢天利打赏的￥40.34">天利</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:77.57%"><div class="HP-fill-in"><span>77.57%</span></div></div></div></div><div class="partner-level"><span>2172</span><span>|</span><span>2800</span><span>lv.52</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://bingmeng158.github.io" data-title="感谢冰梦打赏的￥1.5">冰梦</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:30%"><div class="HP-fill-in"><span>30.00%</span></div></div></div></div><div class="partner-level"><span>135</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://0410wzn.top" data-title="感谢WZN打赏的￥1.35">WZN</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:27.11%"><div class="HP-fill-in"><span>27.11%</span></div></div></div></div><div class="partner-level"><span>122</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢KD打赏的￥1.5">KD</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:30%"><div class="HP-fill-in"><span>30.00%</span></div></div></div></div><div class="partner-level"><span>135</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢**庆打赏的￥3.5">**庆</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:70%"><div class="HP-fill-in"><span>70.00%</span></div></div></div></div><div class="partner-level"><span>315</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://www.sunguoqi.com" data-title="感谢小孙打赏的￥5.2">小孙</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:52%"><div class="HP-fill-in"><span>52.00%</span></div></div></div></div><div class="partner-level"><span>364</span><span>|</span><span>700</span><span>lv.10</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://blog.nalex.top" data-title="感谢rootlex打赏的￥4">rootlex</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:80%"><div class="HP-fill-in"><span>80.00%</span></div></div></div></div><div class="partner-level"><span>360</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://dreamfall.cn" data-title="感谢梦落打赏的￥1.88">梦落</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:37.56%"><div class="HP-fill-in"><span>37.56%</span></div></div></div></div><div class="partner-level"><span>169</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://blog.cyfan.top" data-title="感谢CYF打赏的￥1.5">CYF</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:30%"><div class="HP-fill-in"><span>30.00%</span></div></div></div></div><div class="partner-level"><span>135</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢一悲打赏的￥2.5">一悲</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:41.6%"><div class="HP-fill-in"><span>41.60%</span></div></div></div></div><div class="partner-level"><span>208</span><span>|</span><span>500</span><span>lv.6</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://hexo.cf" data-title="感谢八神打赏的￥10">八神</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:83.38%"><div class="HP-fill-in"><span>83.38%</span></div></div></div></div><div class="partner-level"><span>667</span><span>|</span><span>800</span><span>lv.12</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://noionion.top" data-title="感谢贰猹打赏的￥20">贰猹</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:90.92%"><div class="HP-fill-in"><span>90.92%</span></div></div></div></div><div class="partner-level"><span>1182</span><span>|</span><span>1300</span><span>lv.22</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://blog.slqwq.cn" data-title="感谢Hajeekn打赏的￥10">Hajeekn</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:66.63%"><div class="HP-fill-in"><span>66.63%</span></div></div></div></div><div class="partner-level"><span>633</span><span>|</span><span>950</span><span>lv.15</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" target="_blank" rel="noopener external nofollow noreferrer" href="https://baokan0.com" data-title="感谢baokan0打赏的￥20">baokan0</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:95.2%"><div class="HP-fill-in"><span>95.20%</span></div></div></div></div><div class="partner-level"><span>1190</span><span>|</span><span>1250</span><span>lv.21</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢h*d打赏的￥10">h*d</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:66.63%"><div class="HP-fill-in"><span>66.63%</span></div></div></div></div><div class="partner-level"><span>633</span><span>|</span><span>950</span><span>lv.15</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢**航打赏的￥10">**航</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:66.63%"><div class="HP-fill-in"><span>66.63%</span></div></div></div></div><div class="partner-level"><span>633</span><span>|</span><span>950</span><span>lv.15</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢I*u打赏的￥2">I*u</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:40%"><div class="HP-fill-in"><span>40.00%</span></div></div></div></div><div class="partner-level"><span>180</span><span>|</span><span>450</span><span>lv.5</span></div></div><div class="partner-item"><div class="partner-rank"></div><div class="partner-user"><a alt="" href="javascript:void(0);" rel="external nofollow noreferrer" data-title="感谢7*i打赏的￥1">7*i</a></div><div class="partner-data"><div class="partner-HP"><div class="HP-fill" style="width:20%"><div class="HP-fill-in"><span>20.00%</span></div></div></div></div><div class="partner-level"><span>90</span><span>|</span><span>450</span><span>lv.5</span></div></div></div></div><script async src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/SAO_ranklist.js"></script><div class="pjax-reload"><script async>for(var arr=document.getElementsByClassName("recent-post-item"),i=0;i<arr.length;i++)arr[i].classList.add("wow"),arr[i].classList.add("animate__zoomIn"),arr[i].setAttribute("data-wow-duration",""),arr[i].setAttribute("data-wow-delay",""),arr[i].setAttribute("data-wow-offset",""),arr[i].setAttribute("data-wow-iteration","")</script><script async>for(var arr=document.getElementsByClassName("card-widget"),i=0;i<arr.length;i++)arr[i].classList.add("wow"),arr[i].classList.add("animate__zoomIn"),arr[i].setAttribute("data-wow-duration",""),arr[i].setAttribute("data-wow-delay",""),arr[i].setAttribute("data-wow-offset",""),arr[i].setAttribute("data-wow-iteration","")</script><script async>for(var arr=document.getElementsByClassName("article-sort-item"),i=0;i<arr.length;i++)arr[i].classList.add("wow"),arr[i].classList.add("animate__zoomIn"),arr[i].setAttribute("data-wow-duration",""),arr[i].setAttribute("data-wow-delay",""),arr[i].setAttribute("data-wow-offset",""),arr[i].setAttribute("data-wow-iteration","")</script><script async>for(var arr=document.getElementsByClassName("flink-list-card"),i=0;i<arr.length;i++)arr[i].classList.add("wow"),arr[i].classList.add("animate__flipInY"),arr[i].setAttribute("data-wow-duration","1s"),arr[i].setAttribute("data-wow-delay",""),arr[i].setAttribute("data-wow-offset",""),arr[i].setAttribute("data-wow-iteration","")</script></div><script defer src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/wow.min.js"></script><script defer src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/wow_init.js"></script><div id="fixedcard-dashboard"><button class="fixedcard-activebtn" type="button" title="用户信息" onclick="FixedCardWidget(&quot;class&quot;,&quot;card-author&quot;,&quot;0&quot;)"><i class="fas fa-address-book"></i></button><button class="fixedcard-activebtn" type="button" title="相关推荐" onclick="FixedCardWidget(&quot;class&quot;,&quot;card-recommend-post&quot;,&quot;0&quot;)"><i class="fas fa-dharmachakra"></i></button><div class="fixedcard-user-avatar fixedcard-activebtn" onclick="RemoveFixedCardWidget()"><img class="fixedcard-user-avatar-img" src="" data-lazy-src="https://npm.elemecdn.com/akiblog@1.0.1/img/author.webp" title="Akilar"></div></div><script defer data-pjax src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/fixed_card_widget.js"></script><script defer data-pjax src="https://npm.elemecdn.com/akiblog@1.0.1/js/custom/fixed_comment.js"></script></div><script>var fdata={apiurl:"/json/akifcircle.json",initnumber:20,stepnumber:10,error_img:"https://npm.elemecdn.com/akilar-candyassets/image/404.gif"};localStorage.setItem("fdatalist",JSON.stringify(fdata))</script><script defer src="https://npm.elemecdn.com/hexo-filter-fcircle/assets/js/fetch.js"></script><script data-pjax src="https://npm.elemecdn.com/hexo-filter-gitcalendar/lib/gitcalendar.js"></script><script data-pjax>function gitcalendar_injector_config(){document.getElementById("recent-posts").insertAdjacentHTML("afterbegin",'<div class="recent-post-item" id="gitcalendarBar" style="width:100%;height:auto;padding:10px;"><style>#git_container{min-height: 280px}@media screen and (max-width:650px) {#git_container{min-height: 0px}}</style><div id="git_loading" style="width:10%;height:100%;margin:0 auto;display: block;"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50" xml:space="preserve"><path fill="#d0d0d0" d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z" transform="rotate(275.098 25 25)"><animatetransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite"></animatetransform></path></svg><style>#git_container{display: none;}</style></div><div id="git_container"></div></div>'),console.log("已挂载gitcalendar")}document.getElementById("recent-posts")&&"/"===location.pathname&&(gitcalendar_injector_config(),GitCalendarInit("/json/akicalendar.json",["#e4dfd7","#f9f4dc","#f7e8aa","#f7e8aa","#f8df72","#fcd217","#fcc515","#f28e16","#fb8b05","#d85916","#f43e06"],"Akilarlxh"))</script></body></html>